mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-08 02:49:56 +00:00
37 lines
2.1 KiB
Plaintext
37 lines
2.1 KiB
Plaintext
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
|
|
`
|
|
node core/boot.js <options>
|
|
`
|
|
This boots the TiddlyWiki kernel and loads the core plugins. The wiki store is initially empty.
|
|
|
|
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.
|
|
|
|
The following options are available:
|
|
|`--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 |
|
|
|`--dump tiddlers` |Dump the titles of the tiddlers in the wiki store |
|
|
|`--dump tiddler <title>` |Dump the fields of an individual tiddler |
|
|
|`--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
|
|
This example loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:
|
|
`
|
|
node tiddlywiki.js --verbose --load mywiki.html --savetiddler 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.
|
|
!!Try it out
|
|
The easiest way to try out the code is to visit http://tiddlywiki.com/tiddlywiki5/
|
|
|
|
For trying it out under `node.js`, two batch files are provided:
|
|
|
|
* `run.sh` boots the kernel and loads the core modules and then outputs the `$tw` global for inspection
|
|
* `bld.sh` builds the new TiddlyWiki 5 HTML file (placed in the `tmp/tw5/` directory by default)
|