1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 17:40:29 +00:00
TiddlyWiki5/core/modules
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
..
commands Allow server module to work under Node even if $tw.browser is defined 2015-11-10 18:13:30 +00:00
editor Ensure iframe textarea styles are updated 2016-04-24 12:30:44 +01:00
filters Update has.js 2016-02-18 11:51:29 -05:00
info Obeisance to JSHint for core modules 2014-08-30 20:44:26 +01:00
macros Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
parsers Update wikiparser file comment 2016-02-15 11:33:47 +00:00
savers Fix invalid header in upload plugin 2016-03-03 19:08:24 +02:00
startup Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
storyviews Revert getTiddlerData() and add getTiddlerDataCached() 2015-07-10 16:43:50 +01:00
upgraders Revert getTiddlerData() and add getTiddlerDataCached() 2015-07-10 16:43:50 +01:00
utils Make tiddler file paths configurable (#2379) 2016-04-25 08:36:32 +01:00
widgets Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
commander.js Improve error message for missing commands 2014-11-09 14:49:33 +00:00
config.js Move the wikilink regexps into global config 2014-11-26 11:12:25 +00:00
deserializers.js Fix JSON deserialiser to allow all fields 2014-11-13 16:04:30 +00:00
filters.js Improve a couple of comments 2015-01-14 20:09:15 +00:00
keyboard.js Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
language.js Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
pluginswitcher.js disable enqueueTiddlerEvent during plugin switching 2014-11-01 16:32:52 +03:00
saver-handler.js Refactor browser unload task handling 2015-05-03 16:23:35 +01:00
story.js Fix issues with creation and modification dates 2015-09-11 13:34:01 +01:00
syncer.js Don't repeatedly lazy load the same tiddler 2016-04-18 14:50:13 +01:00
tiddler.js More resilience to Tiddler.isEqual() 2014-11-09 21:47:00 +00:00
wiki-bulkops.js Add renaming to text-slicer tiddler toolbar 2015-08-04 17:44:07 +01:00
wiki.js Merge pull request #2164 from pmario/issue-2158 2016-02-11 09:31:58 +00:00