Hi @JWHoneycutt
this is a modified get[] filter that returns a field of any tiddler line by
line:
/*\
title: $:/core/modules/filters/get.js
type: application/javascript
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 */
"use strict";
/*
Export our filter function
*/
exports.get = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
if(tiddler) {
var value = tiddler.getFieldString(operator.operand);
if(value && operator.suffix !== "lines") {
results.push(value);
} else if(value && operator.suffix === "lines") {
var lines = value.split('\n');
for(var i = 0; i < lines.length; i++) {
results.push(lines[i]);
}
}
}
});
return results;
};
})();
it doesn't change the behaviour of get[] if you use it the normal way like
[[mytiddler]get[text]] or [[mytiddler]get[myfield]]
but it returns the field line by line (if there are more lines) when you
use it this way:
[[mytiddler]get:lines[text]]
this filter needs some testing... if you want to try it, I recommend trying
it in an empty wiki to see if it works for you
I think it can be used to identify lines beginning with ";Task:" and to
extract what follows to ";Task:" like this:
[[mytiddler]get:lines[text]removeprefix[;Task:]]
BTC
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a442478d-7655-4dcf-962a-7862c6ed0183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.