diff --git a/readme.md b/readme.md index 2a0bb1f84..c36d3a1cf 100644 --- a/readme.md +++ b/readme.md @@ -18,6 +18,8 @@ The command line options are processed in sequential order from left to right. P --savetiddlers # Saves all the loaded tiddlers as `.tid` files in the specified directory --servewiki # Serve the cooked TiddlyWiki over HTTP at `/` --servetiddlers # 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 This example loads the tiddlers from a TiddlyWiki HTML file and makes them available over HTTP: diff --git a/tiddlywiki.js b/tiddlywiki.js index fa7b6d45d..faaf3e15f 100644 --- a/tiddlywiki.js +++ b/tiddlywiki.js @@ -127,6 +127,13 @@ var commandLineSwitches = { process.nextTick(function() {callback(null);}); } }, + dumprecipe: { + args: {min: 0, max: 0}, + handler: function(args,callback) { + console.log("Recipe is:\n%s",util.inspect(recipe,false,10)); + process.nextTick(function() {callback(null);}); + } + }, load: { args: {min: 1, max: 1}, handler: function(args,callback) {