Added new command line option to save an individual tiddler

This commit is contained in:
Jeremy Ruston 2012-01-15 11:44:50 +00:00
parent c3c5334795
commit 550060466d
1 changed files with 10 additions and 0 deletions

View File

@ -123,6 +123,16 @@ var commandLineSwitches = {
});
}
},
savetiddler: {
args: {min: 2, max: 3},
handler: function(args,callback) {
var type = args[2] || "text/html";
fs.writeFileSync(args[1],
"<!doctype html><html><head></head><body>" +
app.store.renderTiddler(type,args[0]) +
"</body></html>","utf8");
}
},
savetiddlers: {
args: {min: 1, max: 1},
handler: function(args,callback) {