Extract highlighted or marked text in the text of a tiddler

Hi,

I use the following to highlight text in the main text body of tiddlers, it uses a CSS class called highlight.

@@.highlight Here is some example text @@

Actually I have two CSS highlight classes, highlight and highlightr the latter being for really important text.

So I am thinking in terms of writing some kind of “show me the essentials” feature which might collect highlighted text from tiddlers and present them perhaps in a single tiddler…so I might want a tiddler to present the results in it’s main body text with output something like this…

Tiddler Title1

Highlighted Extract 1
Highlighted Extract 2

Tiddler Title 2

Highlighted Extract 1
Highlighted Extract 2
Highlighted Extract 3

So I might write a filter to select a subset of tiddlers and then want to see the highlights only, separated by tiddler title and shown in one place - perhaps I want to see highlights only from tiddlers with a certain tag.

Is it possible to extract a number of sections from the main text of a single tiddler where the sections of interest are identified by a start and end string such as ‘@@.highlight’ and ‘@@’? Someone else might want different ‘markers’ to identify sections of text that are of interest but for me my existing highlight system makes perfect sense.

My initial research suggests the difficulty here might be the fact that there is an indefinite number of such sections to extract in a single tiddler - is this correct?

I am intermediate level so I can probably figure out the “outer layers” of this one myself and the idea is still in flux.

The bit I need advice on is extracting an indefinite number of sections of text indicated by start and end strings and presenting them together with their individual tiddler titles in the fashion shown above.

You should be interested in the Cherrypicker plugin which does exactly this. It probably needs some updating though.

1 Like

Great thanks that looks like a very good place to start playing around.

I know this is only a comment but it is not an unrelated issue. Hopefully it is moral support for a good outcome on this Topic. Perhaps also some relevance to look at Sticky ToDo plugin methodology.

I am interested in this cherrypicker like TW5 function as well. Not a coder myself to update the old plugin, so will look forward to any updates here.

My use would be to list tiddlers by tag or field content displaying the list as their title link and extract of ‘Actions’ set of text from each tiddler after the tiddler name link.

I am looking at the excellent Sticky ToDo plugin which may be a alternate fall-back method for me.

My need is to enhance my GTD todo lists and reduce load of opening and closing tiddlers to see their Actions. I do not want to do internal Actions tiddlers for each of hundreds of Tiddlers to achieve the same thing that can be done with a single use few lines of code.

Good luck and let us know if you have some success.