Split Operator?

96 views
Skip to first unread message

Stobot

unread,
Nov 15, 2018, 3:31:19 PM11/15/18
to TiddlyWiki
Hello all - hoping someone has an idea of how to go about this.

What I'm essentially trying to do is return the *line* of text from a tiddler based on it matching a filter. I often take notes rapidly and mark some of the lines as todo. I'm currently doing this with surrounding a word in double-equal signs like ==word==. I can then easily show on my 'home' tiddler the names of the tiddlers that contain that string, but I can't see the actual todo.

I started thinking that if there was an actual splitby[] type operator that took an input and split it into a list, then I could iterate through it. Splitbefore and split after exist, but they don't do what I'm looking for. If we had a split, I could:
- Take the whole text of a tiddler I know contains the string
- Split the text into lines (line breaks or *s for bullet points)
- Return the line that contains the text.

Anyone have a creative solution or plugin like this?
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Gracius

unread,
Jan 24, 2019, 7:17:47 AM1/24/19
to TiddlyWiki
+1 upvote on this to be added as a filter operator!
I've been struggling with the very same problem, and have not come up with any creative solutions using list/filter operators.  Seems the only way to do it would be javascript

Mark S.

unread,
Jan 24, 2019, 10:56:26 AM1/24/19
to TiddlyWiki
You can use the "splitby" operator in a limited, awkward fashion. It usually takes multiple nested lists and is not very precise.

Considering experimenting with and upvoting:


This will allow you to split text by regular expressions, which is probably the most versatile splitting approach.

-- Mark
Reply all
Reply to author
Forward
0 new messages