1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-15 23:33:14 +00:00

remove blks first try

This commit is contained in:
pmario 2023-07-07 13:15:03 +02:00
parent 6954fbee51
commit fc36b2e693
475 changed files with 2068 additions and 2599 deletions

View File

@ -6,7 +6,7 @@ module-type: global
The $tw.Commander class is a command interpreter
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -174,4 +174,3 @@ Commander.initCommands = function(moduleType) {
exports.Commander = Commander;
})();

View File

@ -6,7 +6,6 @@ module-type: command
Command to build a build target
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -48,5 +47,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();

View File

@ -6,7 +6,6 @@ module-type: command
Clear password for crypto operations
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -29,5 +28,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();

View File

@ -7,8 +7,6 @@ Runs the commands returned from a filter
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
@ -38,5 +36,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();

View File

@ -6,7 +6,6 @@ module-type: command
Command to delete tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -38,5 +37,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to list the available editions
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -36,4 +36,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Commands to fetch external tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -172,4 +172,3 @@ Command.prototype.processBody = function(body,type,options,url) {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Help command
\*/
(function(){
/*jshint node: true, browser: true */
/*global $tw: false */
@ -38,4 +38,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to import tiddlers from a file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -45,4 +45,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to initialise an empty wiki folder
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -56,4 +56,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Listen for HTTP requests and serve tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -45,4 +45,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to load tiddlers from a file or directory
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -48,4 +48,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to pack all of the plugins in the library into a plugin tiddler of type "library"
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -67,4 +67,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to set the default output location (defaults to current working directory)
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -35,4 +35,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Save password for crypto operations
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -33,4 +33,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,61 +6,57 @@ module-type: command
Render individual tiddlers and save the results to the specified files
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
exports.info = {
name: "render",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing tiddler filter";
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
exports.info = {
name: "render",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing tiddler filter";
}
var self = this,
fs = require("fs"),
path = require("path"),
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]addsuffix[.html]]",
type = this.params[2] || "text/html",
template = this.params[3],
variableList = this.params.slice(4),
tiddlers = wiki.filterTiddlers(tiddlerFilter),
variables = Object.create(null);
while(variableList.length >= 2) {
variables[variableList[0]] = variableList[1];
variableList = variableList.slice(2);
}
var self = this,
fs = require("fs"),
path = require("path"),
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]addsuffix[.html]]",
type = this.params[2] || "text/html",
template = this.params[3],
variableList = this.params.slice(4),
tiddlers = wiki.filterTiddlers(tiddlerFilter),
variables = Object.create(null);
while(variableList.length >= 2) {
variables[variableList[0]] = variableList[1];
variableList = variableList.slice(2);
}
$tw.utils.each(tiddlers,function(title) {
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
});
return null;
};
exports.Command = Command;
})();
$tw.utils.each(tiddlers,function(title) {
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
});
return null;
};
exports.Command = Command;

View File

@ -6,7 +6,7 @@ module-type: command
Command to render a tiddler and save it to a file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -54,4 +54,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to render several tiddlers to a folder of files
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -66,4 +66,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,62 +6,58 @@ module-type: command
Saves individual tiddlers in their raw text or binary format to the specified files
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "save",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing filename filter";
}
var self = this,
fs = require("fs"),
path = require("path"),
result = null,
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]]",
tiddlers = wiki.filterTiddlers(tiddlerFilter);
$tw.utils.each(tiddlers,function(title) {
if(!result) {
var tiddler = self.commander.wiki.getTiddler(title);
if(tiddler) {
var fileInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
directory: path.resolve(self.commander.outputPath),
pathFilters: [filenameFilter],
wiki: wiki,
fileInfo: {}
});
if(self.commander.verbose) {
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");
}
try {
$tw.utils.saveTiddlerToFileSync(tiddler,fileInfo);
} catch (err) {
result = "Error saving tiddler \"" + title + "\", to file: \"" + fileInfo.filepath + "\"";
}
} else {
result = "Tiddler '" + title + "' not found";
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "save",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing filename filter";
}
var self = this,
fs = require("fs"),
path = require("path"),
result = null,
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]]",
tiddlers = wiki.filterTiddlers(tiddlerFilter);
$tw.utils.each(tiddlers,function(title) {
if(!result) {
var tiddler = self.commander.wiki.getTiddler(title);
if(tiddler) {
var fileInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
directory: path.resolve(self.commander.outputPath),
pathFilters: [filenameFilter],
wiki: wiki,
fileInfo: {}
});
if(self.commander.verbose) {
console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\"");
}
try {
$tw.utils.saveTiddlerToFileSync(tiddler,fileInfo);
} catch(err) {
result = "Error saving tiddler \"" + title + "\", to file: \"" + fileInfo.filepath + "\"";
}
} else {
result = "Tiddler '" + title + "' not found";
}
});
return result;
};
exports.Command = Command;
})();
}
});
return result;
};
exports.Command = Command;

View File

@ -16,7 +16,7 @@ The pathname specifies the pathname to the folder in which the JSON files should
The skinnylisting specifies the title of the tiddler to which a JSON catalogue of the subtiddlers will be saved. The JSON file contains the same data as the bundle tiddler but with the `text` field removed.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -95,4 +95,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to save the content of a tiddler to a file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -48,4 +48,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to save several tiddlers to a folder of files
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -53,4 +53,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -15,7 +15,7 @@ The following options are supported:
Supports backward compatibility with --savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]*
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -46,7 +46,7 @@ Command.prototype.execute = function() {
namedParames,
tiddlerFilter,
options = {};
if (regFilter.test(this.params[1])) {
if(regFilter.test(this.params[1])) {
namedParames = this.commander.extractNamedParameters(this.params.slice(1));
tiddlerFilter = namedParames.filter || "[all[tiddlers]]";
} else {
@ -198,7 +198,7 @@ WikiFolderMaker.prototype.saveTiddler = function(directory,tiddler) {
});
try {
$tw.utils.saveTiddlerToFileSync(tiddler,fileInfo);
} catch (err) {
} catch(err) {
console.log("SaveWikiFolder: Error saving file '" + fileInfo.filepath + "', tiddler: '" + tiddler.fields.title);
}
};
@ -219,4 +219,3 @@ WikiFolderMaker.prototype.saveFile = function(filename,encoding,data) {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Deprecated legacy command for serving tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -52,4 +52,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -55,4 +55,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Command to extract the shadow tiddlers from within a plugin
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -41,4 +41,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Verbose command
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -31,4 +31,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: command
Version command
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -29,4 +29,3 @@ Command.prototype.execute = function() {
exports.Command = Command;
})();

View File

@ -6,7 +6,7 @@ module-type: config
Core configuration constants
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -38,4 +38,3 @@ exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,de
exports.htmlUnsafeElements = "script".split(",");
})();

View File

@ -6,7 +6,7 @@ module-type: tiddlerdeserializer
Functions to deserialise tiddlers from a block of text
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -182,4 +182,3 @@ var deserializeTiddlerDiv = function(text /* [,fields] */) {
return undefined;
};
})();

View File

@ -6,7 +6,7 @@ module-type: library
Text editor engine based on a simple input or textarea within an iframe. This is done so that the selection is preserved even when clicking away from the textarea
\*/
(function(){
/*jslint node: true,browser: true */
/*global $tw: false */
@ -200,7 +200,7 @@ FramedEngine.prototype.handleFocusEvent = function(event) {
Handle a keydown event
*/
FramedEngine.prototype.handleKeydownEvent = function(event) {
if ($tw.keyboardManager.handleKeydownEvent(event, {onlyPriority: true})) {
if($tw.keyboardManager.handleKeydownEvent(event, {onlyPriority: true})) {
return true;
}
@ -274,4 +274,3 @@ FramedEngine.prototype.executeTextOperation = function(operation) {
exports.FramedEngine = FramedEngine;
})();

View File

@ -6,7 +6,7 @@ module-type: library
Text editor engine based on a simple input or textarea tag
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -173,4 +173,3 @@ SimpleEngine.prototype.executeTextOperation = function(operation) {
exports.SimpleEngine = SimpleEngine;
})();

View File

@ -6,7 +6,7 @@ module-type: library
Factory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -223,7 +223,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) {
this.refreshSelf();
return true;
} else if (changedTiddlers[this.editRefreshTitle]) {
} else if(changedTiddlers[this.editRefreshTitle]) {
this.engine.updateDomNodeText(this.getEditInfo().value);
} else if(changedTiddlers[this.editTitle]) {
var editInfo = this.getEditInfo();
@ -387,4 +387,3 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
exports.editTextWidgetFactory = editTextWidgetFactory;
})();

View File

@ -6,7 +6,7 @@ module-type: bitmapeditoroperation
Bitmap editor operation to clear the image
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -21,4 +21,3 @@ exports["clear"] = function(event) {
this.strokeEnd();
};
})();

View File

@ -6,7 +6,7 @@ module-type: bitmapeditoroperation
Bitmap editor operation to resize the image
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -26,4 +26,3 @@ exports["resize"] = function(event) {
this.saveChanges();
};
})();

View File

@ -6,7 +6,7 @@ module-type: bitmapeditoroperation
Bitmap editor operation to rotate the image left by 90 degrees
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -21,4 +21,3 @@ exports["rotate-left"] = function(event) {
this.saveChanges();
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to excise the selection to a new tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -46,4 +46,3 @@ exports["excise"] = function(event,operation) {
operation.newSelEnd = operation.selStart + operation.replacement.length;
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: texteditoroperation
Simply focus the Text editor
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -13,5 +13,3 @@ Simply focus the Text editor
exports["focus-editor"] = function(event,operation) {
operation = null;
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation insert text at the caret position. If there is a selection it is replaced.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -20,4 +20,3 @@ exports["insert-text"] = function(event,operation) {
operation.newSelEnd = operation.newSelStart;
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to make a link
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -26,4 +26,3 @@ exports["make-link"] = function(event,operation) {
operation.newSelEnd = operation.newSelStart;
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to add a prefix to the selected lines
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -52,4 +52,3 @@ exports["prefix-lines"] = function(event,operation) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to replace the entire text
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -20,4 +20,3 @@ exports["replace-all"] = function(event,operation) {
operation.newSelEnd = operation.replacement.length;
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to replace the selection
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -20,4 +20,3 @@ exports["replace-selection"] = function(event,operation) {
operation.newSelEnd = operation.selStart + operation.replacement.length;
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to save the current selection in a specified tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -20,4 +20,3 @@ exports["save-selection"] = function(event,operation) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to wrap the selected lines with a prefix and suffix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,7 +22,7 @@ exports["wrap-lines"] = function(event,operation) {
operation.cutStart = operation.selStart - (prefix.length + 1);
operation.cutEnd = operation.selEnd + suffix.length + 1;
// Also cut the following newline (if there is any)
if (operation.text[operation.cutEnd] === "\n") {
if(operation.text[operation.cutEnd] === "\n") {
operation.cutEnd++;
}
// Replace with selection
@ -44,4 +44,3 @@ exports["wrap-lines"] = function(event,operation) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: texteditoroperation
Text editor operation to wrap the selection with the specified prefix and suffix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -47,4 +47,3 @@ exports["wrap-selection"] = function(event,operation) {
}
};
})();

View File

@ -7,7 +7,7 @@ Union of sets without de-duplication.
Equivalent to = filter run prefix.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,4 +22,3 @@ exports.all = function(operationSubFunction) {
};
};
})();

View File

@ -7,7 +7,7 @@ Intersection of sets.
Equivalent to + filter run prefix.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -25,4 +25,3 @@ exports.and = function(operationSubFunction,options) {
};
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filterrunprefixes/cascade.js
type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -39,5 +39,3 @@ exports.cascade = function(operationSubFunction,options) {
}
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: filterrunprefix
Equivalent to ~ filter run prefix.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -24,4 +24,3 @@ exports.else = function(operationSubFunction) {
};
};
})();

View File

@ -7,7 +7,7 @@ Difference of sets.
Equivalent to - filter run prefix.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,4 +22,3 @@ exports.except = function(operationSubFunction) {
};
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -36,4 +36,3 @@ exports.filter = function(operationSubFunction,options) {
}
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -28,4 +28,3 @@ exports.intersection = function(operationSubFunction) {
};
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filterrunprefixes/map.js
type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -40,5 +40,3 @@ exports.map = function(operationSubFunction,options) {
}
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: filterrunprefix
Equivalent to a filter run with no prefix.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -21,4 +21,3 @@ exports.or = function(operationSubFunction) {
};
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filterrunprefixes/reduce.js
type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -37,4 +37,3 @@ exports.reduce = function(operationSubFunction,options) {
}
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: filterrunprefix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -48,5 +48,3 @@ exports.sort = function(operationSubFunction,options) {
}
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: filterrunprefix
Replace results of previous runs unless empty
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -29,4 +29,3 @@ exports.then = function(operationSubFunction) {
};
};
})();

View File

@ -6,7 +6,7 @@ module-type: wikimethod
Adds tiddler filtering methods to the $tw.Wiki object.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -70,7 +70,7 @@ function parseFilterOperation(operators,filterString,p) {
operator.operands = [];
var parseOperand = function(bracketType) {
var operand = {};
switch (bracketType) {
switch(bracketType) {
case "{": // Curly brackets
operand.indirect = true;
nextBracketPos = filterString.indexOf("}",p);
@ -368,4 +368,3 @@ exports.compileFilter = function(filterString) {
return fnMeasured;
};
})();

View File

@ -8,7 +8,7 @@ especially useful in contexts where only a filter expression is allowed
and macro substitution isn't available.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -25,4 +25,3 @@ exports.addprefix = function(source,operator,options) {
return results;
};
})();

View File

@ -8,7 +8,7 @@ especially useful in contexts where only a filter expression is allowed
and macro substitution isn't available.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -25,4 +25,3 @@ exports.addsuffix = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning the tiddler from the current list that is after the tiddler named in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -28,4 +28,3 @@ exports.after = function(source,operator,options) {
}
};
})();

View File

@ -8,7 +8,7 @@ Filter operator for selecting tiddlers
[all[shadows+tiddlers]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -55,4 +55,3 @@ exports.all = function(source,operator,options) {
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[current]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -24,4 +24,3 @@ exports.current = function(source,prefix,options) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[missing]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -19,4 +19,3 @@ exports.missing = function(source,prefix,options) {
return options.wiki.getMissingTitles();
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[orphans]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -19,4 +19,3 @@ exports.orphans = function(source,prefix,options) {
return options.wiki.getOrphanTitles();
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[shadows]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -19,4 +19,3 @@ exports.shadows = function(source,prefix,options) {
return options.wiki.allShadowTitles();
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[tags]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -19,4 +19,3 @@ exports.tags = function(source,prefix,options) {
return Object.keys(options.wiki.getTagMap());
};
})();

View File

@ -6,7 +6,7 @@ module-type: allfilteroperator
Filter function for [all[tiddlers]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -19,4 +19,3 @@ exports.tiddlers = function(source,prefix,options) {
return options.wiki.allTitles();
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning all the backlinks from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -23,4 +23,3 @@ exports.backlinks = function(source,operator,options) {
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning the tiddler from the current list that is before the tiddler named in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -28,4 +28,3 @@ exports.before = function(source,operator,options) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning the names of the commands available in this wiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -24,4 +24,3 @@ exports.commands = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
General purpose comparison operator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -37,4 +37,3 @@ var modes = {
"lt": function(value) {return value < 0;}
}
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for finding values in array fields
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -42,4 +42,3 @@ exports.contains = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning the number of entries in the current list.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -23,4 +23,3 @@ exports.count = function(source,operator,options) {
return [count + ""];
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operators for cryptography, using the Stanford JavaScript library
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -24,4 +24,3 @@ exports.sha256 = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator that selects tiddlers with a specified date field within a specified date interval.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -47,4 +47,3 @@ exports.days = function(source,operator,options) {
return results;
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: filteroperator
Filter operator for deserializing string data into JSON representing tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -35,5 +35,3 @@ exports["deserialize"] = function(source,operator,options) {
}
return results;
}
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning the names of the deserializers in this wiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -23,5 +23,3 @@ exports.deserializers = function(source,operator,options) {
results.sort();
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter function for [duplicateslugs[]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -33,4 +33,3 @@ exports.duplicateslugs = function(source,operator,options) {
return results;
};
})();

View File

@ -7,7 +7,7 @@ Filter operator that selects one tiddler for each unique value of the specified
With suffix "list", selects all tiddlers that are values in a specified list field.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -64,4 +64,3 @@ exports.each = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator that selects one tiddler for each unique day covered by the specified date field
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -36,4 +36,3 @@ exports.eachday = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning the descriptions of the specified edition names
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -30,4 +30,3 @@ exports.editiondescription = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning the names of the available editions in this wiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -29,4 +29,3 @@ exports.editions = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for replacing an empty input list with a constant, passing a non-empty input list straight through
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -27,4 +27,3 @@ exports.else = function(source,operator,options) {
}
};
})();

View File

@ -6,7 +6,6 @@ module-type: filteroperator
Filter operator for applying decodeURIComponent() to each item.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -113,4 +112,3 @@ exports.escapecss = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning its operand parsed as a list
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -39,4 +39,3 @@ exports.enlist = function(source,operator,options) {
}
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for comparing fields for equality
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -72,4 +72,3 @@ exports.field = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for returning the names of the fields on the selected tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -27,7 +27,7 @@ exports.fields = function(source,operator,options) {
for(fieldName in tiddler.fields) {
(operand.indexOf(fieldName) !== -1) ? $tw.utils.pushTop(results,fieldName) : "";
}
} else if (suffixes.indexOf("exclude") !== -1) {
} else if(suffixes.indexOf("exclude") !== -1) {
for(fieldName in tiddler.fields) {
(operand.indexOf(fieldName) !== -1) ? "" : $tw.utils.pushTop(results,fieldName);
}
@ -42,4 +42,3 @@ exports.fields = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning those input titles that pass a subfilter
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -31,4 +31,3 @@ exports.filter = function(source,operator,options) {
return results;
};
})();

View File

@ -4,7 +4,7 @@ type: application/javascript
module-type: filteroperator
Filter operator for formatting strings
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -42,5 +42,3 @@ exports.format = function(source,operator,options) {
return results;
}
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filters/format/date.js
type: application/javascript
module-type: formatfilteroperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,5 +22,3 @@ exports.date = function(source,operand,options) {
});
return results;
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filters/format/json.js
type: application/javascript
module-type: formatfilteroperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -31,5 +31,3 @@ exports.json = function(source,operand,options) {
});
return results;
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filters/format/relativedate.js
type: application/javascript
module-type: formatfilteroperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,5 +22,3 @@ exports.relativedate = function(source,operand,options) {
});
return results;
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filters/format/timestamp.js
type: application/javascript
module-type: formatfilteroperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -15,11 +15,10 @@ Export our filter function
exports.timestamp = function(source,operand,options) {
var results = [];
source(function(tiddler,title) {
if (title.match(/^-?\d+$/)) {
if(title.match(/^-?\d+$/)) {
var value = new Date(Number(title));
results.push($tw.utils.formatDateString(value,operand || "[UTC]YYYY0MM0DD0hh0mm0ss0XXX"));
}
});
return results;
};
})();
};

View File

@ -3,7 +3,7 @@ title: $:/core/modules/filters/format/titlelist.js
type: application/javascript
module-type: formatfilteroperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -22,4 +22,3 @@ exports.titlelist = function(source,operand,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator returning those input titles that are returned from a function
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -33,4 +33,3 @@ exports.function = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for replacing tiddler titles by the value of the field specified in the operand.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -28,4 +28,3 @@ exports.get = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
returns the value at a given index of datatiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -29,4 +29,3 @@ exports.getindex = function(source,operator,options) {
return results;
};
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operator for replacing input values by the value of the variable with the same name, or blank if the variable is missing
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@ -23,4 +23,3 @@ exports.getvariable = function(source,operator,options) {
return results;
};
})();

Some files were not shown because too many files have changed in this diff Show More