1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

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

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: { savetiddlers: {
args: {min: 1, max: 1}, args: {min: 1, max: 1},
handler: function(args,callback) { handler: function(args,callback) {