Searching for excerpts in a book

116 views
Skip to first unread message

FrD

unread,
Jul 7, 2018, 11:35:57 AM7/7/18
to TiddlyWiki
Hi,

After having scanned and OCR(ed ?) a (very) small book, I've copied the chapters in tiddlers. My interest was to be able to find some sentences (or part of) quickly and to cross reference with other documents (and add my own notes on the chapters).

I'd like to copy a part of a sentence that I know in a search box and find the exact match. But the results include the tiddlers where sometimes only one word matches.

How can I use the search abilities of TW in order to find "exactly" some given excerpt ?

Thanks for your hints !

Regards

FrD

Mark S.

unread,
Jul 7, 2018, 1:12:12 PM7/7/18
to TiddlyWiki
If you go the advanced search (click on little magnifying glass next to the regular search), and then select the "Filter" tab, you can enter a search like:

[regexp:text[my string of text]]

which should find any tiddlers with "my string of text" in their main text field.

HTH
-- Mark

Diego Mesa

unread,
Jul 7, 2018, 1:46:23 PM7/7/18
to TiddlyWiki
Hey FrD,

I brought up this to Jeremy not that long ago - regrettably, there is no "easy" way to specify an AND search phrase, as opposed to an OR. As Mark said, you have to use regexp filtering. 

Jed Carty

unread,
Jul 7, 2018, 2:02:42 PM7/7/18
to TiddlyWiki
Because this same question has been asked a few times I made a quick tiddler that gives you an exact text search, it is just the solution Mark gave with a very simple interface.


At the moment it only searches the text field, if that is a problem it can be changed.

FrD

unread,
Jul 7, 2018, 5:15:47 PM7/7/18
to TiddlyWiki
Hi @Mark, @Diego, @Jed

Thanks a lot for your answers. It confirms what I was suspecting after trying Danielo's Context plugin (here).
With your help and Danielo's plugin I'm confident I'll get my way.
(Having a bit of context is very useful for my use case).

Regards

FrD

FrD

unread,
Jul 8, 2018, 3:40:34 AM7/8/18
to TiddlyWiki
Hi Jed,

Your tool works fine but I don't understand why your <$list> loop is empty. How does the display of the results take place ?

Thanks

Regards

FrD

Le samedi 7 juillet 2018 20:02:42 UTC+2, Jed Carty a écrit :

Jed Carty

unread,
Jul 8, 2018, 4:11:04 AM7/8/18
to TiddlyWiki
Jeremy gave a much better response to this not that long ago but I don't know which thread it is in. The short version is that it is the default behaviour of the list widget.

If you have an empty line inside the list widget it displays the tiddler titles and adds line breaks, so this:

<$list filter=<<someFilter>>>


</$list>


gives the same result as this:

<$list filter=<<someFilter>>><$link><<currentTiddler>></$link><br></$list>


If you don't put in the empty space than there is no line break.
So this:

<$list filter=<<someFilter>>>
</$list>


gives the same result as this:

<$list filter=<<someFilter>>><$link><<currentTiddler>></$link></$list>


You can change what is contained inside the $list tags and change the template to display each item, but for this I didn't think it was necessary.

FrD

unread,
Jul 8, 2018, 4:23:32 AM7/8/18
to TiddlyWiki
Hi Jed,

Thanks for your quick and detailed answer.
I've been fiddling with the list widget for some time now and was not aware of this.
Good to know.

Regards

FrD

TonyM

unread,
Jul 8, 2018, 4:35:52 AM7/8/18
to TiddlyWiki
FrD,

As Jed said, I will add the most common thing I now type is

<$list filter="filter" variable="null">

</$list>

Then do from there, although it is a good habit (I have not established) to place the "filter" in the advanced search filter, unless you know the filter begins "[is[current].. or "[all[current...

Regards
Tony
Reply all
Reply to author
Forward
0 new messages