1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-11 23:09:42 +00:00
TiddlyWiki5/core/language/en-GB/Help/save.tid
Jermolene 35a7a66b01 Add "save" and "render" commands
A first pass at fixing #2973 - comments are welcome. If everybody is
happy, the next step is to deprecate the existing
rendertiddler(s)/savetiddler(s) commands and replace them in all
examples and tiddlywiki.info files with the new equivalents.
2017-09-12 16:04:07 +01:00

26 lines
1.6 KiB
Plaintext

title: $:/language/Help/save
description: Saves individual raw tiddlers to files
Saves individual tiddlers in their raw text or binary format to the specified files.
```
--save <tiddler-filter> <filename-filter>
```
* ''tiddler-filter'': A filter identifying the tiddler(s) to be saved
* ''filename-filter'': Optional filter transforming tiddler titles into pathnames. If omitted, defaults to `[is[tiddler]]`, which uses the unchanged tiddler title as the filename
By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
Notes:
* The output directory is not cleared of any existing files
* Any missing directories in the path to the filename are automatically created.
* When saving a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets : `--save "[[Motovun Jack.jpg]]"`
* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being saved, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`
* The `--save` command is a more flexible replacement for both the `--savetiddler` and `--savetiddlers` commands, which are deprecated
Examples:
* `--save "[!is[system]is[image]]" "[encodeuricomponent[]addprefix[tiddlers/]]"` -- saves all non-system image tiddlers as files in the subdirectory "tiddlers" with URL-encoded titles