mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-23 23:46:52 +00:00
Added a 'dump tiddler' command
This commit is contained in:
parent
fa0e16eef5
commit
a094dc4b29
@ -37,6 +37,17 @@ Command.prototype.execute = function() {
|
||||
|
||||
Command.prototype.subcommands = {};
|
||||
|
||||
Command.prototype.subcommands.tiddler = function() {
|
||||
if(this.params.length < 2) {
|
||||
return "Too few parameters for dump tiddler command";
|
||||
}
|
||||
var tiddler = this.commander.wiki.getTiddler(this.params[1]);
|
||||
this.output.write("Tiddler '" + this.params[1] + "' contains these fields:\n");
|
||||
for(var t in tiddler.fields) {
|
||||
this.output.write(" " + t + ": " + tiddler.getFieldString(t) + "\n");
|
||||
}
|
||||
return null; // No error
|
||||
};
|
||||
|
||||
Command.prototype.subcommands.tiddlers = function() {
|
||||
var tiddlers = this.commander.wiki.sortTiddlers();
|
||||
|
Loading…
Reference in New Issue
Block a user