mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-02 14:32:53 +00:00
37 lines
2.2 KiB
Plaintext
37 lines
2.2 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 tiddlywiki.js <options>
|
||
|
}}}
|
||
|
The command line options are processed sequentially from left to right. Processing pauses during long operations, like loading a [[recipe file|RecipeFiles]] and all the subrecipes and [[tiddlers|TiddlerFiles]] that it references. The following options are available:
|
||
|
|
||
|
|{{{--recipe <filepath>}}} |Loads a specfied `.recipe` file |
|
||
|
|{{{--load <filepath>}}} |Load additional tiddlers from TiddlyWiki files ({{{.html}}}), {{{.tiddler}}}, {{{.tid}}}, {{{.json}}} or other files |
|
||
|
|{{{--savewiki <dirpath>}}} |Saves all the loaded tiddlers as a single file TiddlyWiki called {{{index.html}}} and an RSS feed called {{{index.xml}}} |
|
||
|
|{{{--savetiddlers <outdir>}}} |Saves all the loaded tiddlers as {{{.tid}}} files in the specified directory |
|
||
|
|{{{--servewiki <port>}}} |Serve the cooked TiddlyWiki over HTTP at {{{/}}} |
|
||
|
|{{{--servetiddlers <port>}}} |Serve individual tiddlers over HTTP at {{{/tiddlertitle}}} |
|
||
|
|{{{--dumpstore}}} |Dump the TiddlyWiki store in JSON format |
|
||
|
|{{{--dumprecipe}}} |Dump the current recipe in JSON format |
|
||
|
|{{{--verbose}}} |verbose output, useful for debugging |
|
||
|
|
||
|
!! Examples
|
||
|
This example loads the tiddlers from a TiddlyWiki HTML file and makes them available over HTTP:
|
||
|
{{{
|
||
|
node tiddlywiki.js --load mywiki.html --servewiki 127.0.0.1:8000
|
||
|
}}}
|
||
|
This example cooks a TiddlyWiki from a recipe:
|
||
|
{{{
|
||
|
node tiddlywiki.js --recipe tiddlywiki.com/index.recipe --savewiki tmp/
|
||
|
}}}
|
||
|
This example ginsus a TiddlyWiki into its constituent tiddlers:
|
||
|
{{{
|
||
|
node tiddlywiki.js --load mywiki.html --savetiddlers tmp/tiddlers
|
||
|
}}}
|
||
|
!! Notes
|
||
|
{{{--servewiki}}} and {{{--servertiddlers}}} are for different purposes and should not be used together. The former is for TiddlyWiki core developers who want to be able to edit the TiddlyWiki source files in a text editor and view the results in the browser by clicking refresh; it is slow because it reloads all the TiddlyWiki JavaScript files each time the page is loaded. The latter is for experimenting with the new wikification engine.
|