Customising Tiddler File Naming

107 views
Skip to first unread message

jwd

unread,
Jun 18, 2017, 5:31:32 PM6/18/17
to TiddlyWiki
'Customising Tiddler File Naming' shows us how we can modify the directory hierarchy used for tiddlers by creating a $:/config/FileSystemPaths tiddler containing filter expressions.

Is there way to also customize the actual tiddler name in addition to the directory path?

I am motivated in part because 5.1.14 seems to have modified the behavior of nodejs tiddlywikis: spaces in tiddler titles are no longer replaced with '_' characters when generating file names.  I'd like to restore the old behavior - spaces in file names cause me grief. Is there a way with $:/config/FileSystemPaths to define a filter expression to restore the old 5.1.13 behavior?

Related, my preference for journal entries is to have titles like 2017/06/18 - so they sort more nicely. I'd like to create a $:/config/FileSystemPaths filter expression
  [tag[journal]addprefix[Journal/]]
so that the Journal entries end up in a directory. But with my tiddler title preference plus the behavior of $:/config/FileSystemPaths where "If none of the filters matches, the logical path is simply the title with all occurences of / replaced by _ (for backwards compatibility)", because one of my filters does result in a match, that's going to start making deeper Journal/yyyy/mm/dd.tid directory hierarchies. I'd like
  [tag[journal]addprefix[Journal/]] something
so that I can end up with Journal/yyyy_mm_dd.tid tiddler files. Is there an easy way to do that with $:/config/FileSystemPaths; or is that only for directory paths, not tiddler names? I don't see a filter operator to use to accomplish either. Maybe I need something other than a filter operator? If so how? (Other than changing my Control Panel preference for Title of new journal tiddlers; which I guess might accomplish that goal but seems like a "you've got to change to accommodate TiddlyWiki vs the normal TW flexibility.)

If $:/config/FileSystemPaths is not the right way to accomplish either or both of these can you inform me what is?

Thanks!

Leander

unread,
May 29, 2020, 5:43:10 PM5/29/20
to TiddlyWiki
Again, just in case someone finds this in the future:
[tag[journal]split[/]join[_]addprefix[Journal/]]
accomplishes this. 
Reply all
Reply to author
Forward
0 new messages