/*\ title: $:/core/commands/dump.js type: application/javascript module-type: command Dump command \*/ (function(){ /*jslint node: true, browser: true */ "use strict"; exports.info = { name: "dump", synchronous: true, params: {} } var Command = function(params,commander) { this.params = params; this.commander = commander; this.output = commander.streams.output; }; Command.prototype.execute = function() { if(this.params.length < 1) { return "Too few parameters for dump command"; } var subcommand = this.subcommands[this.params[0]]; if(subcommand) { return subcommand.call(this); } else { return "Unknown subcommand (" + this.params[0] + ") for dump command"; } } Command.prototype.subcommands = {}; Command.prototype.subcommands.tiddlers = function() { var tiddlers = this.commander.wiki.sortTiddlers() this.output.write("Wiki contains these tiddlers:\n"); for(var t=0; t