1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-15 00:39:42 +00:00
TiddlyWiki5/rabbithole/tw5.com/tiddlers/CommandLineInterface.tid

30 lines
1.6 KiB
Plaintext
Raw Normal View History

title: CommandLineInterface
modifier: JeremyRuston
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on RecipeFiles, TiddlerFiles and TiddlyWikiFiles.
!!Usage
`
2012-05-04 16:46:01 +00:00
node core/boot.js <options>
`
2012-05-04 16:46:01 +00:00
This boots the TiddlyWiki kernel and loads the core plugins. The wiki store is initially empty.
2012-05-04 16:46:01 +00:00
The command line options are processed sequentially from left to right. Processing pauses during long operations and then resumes with the next command line option in sequence.
ent recipe
The following options are available:
2012-05-04 16:46:01 +00:00
|`--load <filepath>` |Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files |
|`--savetiddler <title> <filename> [<type>]` |Save an individual tiddler as a specified MIME type, defaults to `text/html` |
|`--wikitest <dir> [save]` |Run wikification tests against the tiddlers in the given directory. Include the `save` flag to save the test result files as the new targets |
2012-05-04 16:46:01 +00:00
|`--dump tiddlers` |Dump the titles of the tiddlers in the wiki store |
|`--dump shadows` |Dump the titles of the shadow tiddlers in the wiki store |
|`--dump config` |Dump the current core configuration |
|`--verbose` |Triggers verbose output, useful for debugging |
!! Examples
2012-05-04 16:46:01 +00:00
This example loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:
`
2012-05-04 16:46:01 +00:00
node tiddlywiki.js --verbose --load mywiki.html --savertiddler ReadMe ./readme.html
`
!! Notes
`--wikitest` looks for `*.tid` files in the specified folder. It then wikifies the tiddlers to both "text/plain" and "text/html" format and checks the results against the content of the `*.html` and `*.txt` files in the same directory.