OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
2023-03-24 11:58:33 +00:00
parent e0528394e6
commit dc21b3c71c
1537 changed files with 93 additions and 1028 deletions

View File

@ -0,0 +1,33 @@
/*\
module-type: wikimethod
Introduces some utility methods used by Relink.
\*/
var utils = require("./utils.js");
exports.getTiddlerRelinkReferences = function(title) {
return utils.getIndexer(this).lookup(title);
};
exports.getTiddlerRelinkBackreferences = function(title) {
return utils.getIndexer(this).reverseLookup(title);
};
exports.getRelinkableTitles = function() {
var toUpdate = "$:/config/flibbles/relink/to-update";
var wiki = this;
return this.getCacheForTiddler(toUpdate, "relink-toUpdate", function() {
var tiddler = wiki.getTiddler(toUpdate);
if (tiddler) {
return wiki.compileFilter(tiddler.fields.text);
} else {
return wiki.allTitles;
}
})();
};
exports.getRelinkOrphans = function() {
return utils.getIndexer(this).orphans();
};