mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
1ae428e323
When saving new tiddlers on node.js, allow the user to override the path of the generated .tid file. This is done by creating a tiddler $:/config/FileSystemPaths which contains one or more filter expressions, one per line. These filters are applied in turn to the tiddler to be saved, and the first output produced is taken as a logical path relative to the wiki's tiddlers directory. Any occurences of "/" in the logical path are replaced with the platform's path separator, the extension ".tid" is appended, illegal characters are replaced by "_" and the path is disambiguated (if necessary) in order to arrive at the final tiddler file path. If none of the filters matches, or the configuration tiddler does not exist, fall back to the previous file naming scheme (i.e. replacing "/" by "_"). This implies we will now, for tiddlers matching the user-specified filters, create directory trees below the tiddlers directory. In order to avoid cluttering it with empty directory trees when renaming or removing tiddlers, any directories that become empty by deleting a tiddler file are removed (recursively). Benefits of this configuration option include the ability to organize git repositories of TiddlyWikis running on node.js, ability to replace characters that cause trouble with particular operating systems or workflows (e.g. '$' on unix) and the ability to replicate tiddler "paths" in the filesystem (by including a filter like "[!has[draft.of]]") without forcing such a (potentially problematic) change on all users. |
||
---|---|---|
.. | ||
async | ||
blog | ||
browser-sniff | ||
cecily | ||
classictools | ||
codemirror | ||
d3 | ||
evernote | ||
filesystem | ||
github-fork-ribbon | ||
googleanalytics | ||
help | ||
highlight | ||
internals | ||
jasmine | ||
jszip | ||
katex | ||
markdown | ||
nodewebkitsaver | ||
pluginlibrary | ||
powered-by-tiddlywiki | ||
railroad | ||
stacked-view | ||
tahoelafs | ||
text-slicer | ||
tiddlyweb | ||
translators | ||
tw2parser | ||
tw5.com-docs | ||
upgrade | ||
xmldom |