1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-19 08:14:50 +00:00
TiddlyWiki5/core/modules/utils
nome 1ae428e323 Make tiddler file paths configurable (#2379)
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.
2016-04-25 08:36:32 +01:00
..
dom Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
crypto.js Fix support for upgrading encrypted wikis 2014-07-16 10:06:24 +01:00
edition-info.js Refactor edition-info handling 2015-01-11 15:00:54 +00:00
fakedom.js Text-slicer: Tweaks to fix recently introduced bugs! 2015-09-22 12:57:53 +02:00
filesystem.js Make tiddler file paths configurable (#2379) 2016-04-25 08:36:32 +01:00
logger.js Partial fix for #1570 2015-03-12 22:35:03 +00:00
parsetree.js Add parse tree utility for collecting text 2015-08-01 13:14:32 +01:00
performance.js Add user interface for enabling performance instrumentation 2015-10-14 10:59:55 +01:00
pluginmaker.js Missed corrections of tm-auto-save-wiki message 2014-09-02 11:16:06 +01:00
utils.js Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00