List filter question

77 views
Skip to first unread message

David Gifford

unread,
Mar 5, 2020, 6:27:59 PM3/5/20
to TiddlyWiki
Well, I tried to figure this out for a while but it is not working.

I need a list filter that turns up all tiddlers that neither have the tag 'sources' nor have any links of any kind within the text field. 

This is a list of tiddlers to clean up stragglers in my system.

Thanks in advance for your help!

TonyM

unread,
Mar 5, 2020, 8:32:51 PM3/5/20
to TiddlyWiki
David,

In such cases if you can list all the tiddlers you don't want you should be able negate it with a ! symbol.

If the links to which you refer are only wiki text I believe they are references. 
Could you list all tiddlers the and test to see if they haves no references?

I can give a fuller example if you want.

Regards
Tony

Mark S.

unread,
Mar 5, 2020, 9:11:21 PM3/5/20
to TiddlyWiki
This approach with HelloThere at TiddlyWiki.com seems to work:

\define emptymessage() [[$(currentTiddler)$]]<br/>
<$list filter="[!tag[HelloThere]]">
<$list filter="[all[current]links[]limit[1]]" emptyMessage=<<emptymessage>>>
</$list>
</
$list>

Notice that it doesn't catch links that are generated by macros. It also doesn't include http links as links.
But it might help you clean up stuff.

Luis Gonzalez

unread,
Mar 6, 2020, 2:57:39 AM3/6/20
to TiddlyWiki
This macro does not catch links generated by macros or transclusions.

\define the_filter()

<!-- looks for [[link]] & [ext[link]] & [img[link]] links -->
<$set name="pattern" value="\[.*\[.+\]\]">

<!-- links shown as numbered list -->
<ol>
<$list filter="[all[]!is[system]] -[regexp:text<pattern>] -[tag[source]]">
<li><$link/></li>
</$list>
</ol>
</$set>

\end



Look at Chapter 9 of The-Book for a detailed explanation of filters and regular expressions.

David Gifford

unread,
Mar 6, 2020, 7:33:14 AM3/6/20
to tiddl...@googlegroups.com
Thanks Mark. Once I added !is[system] before the !tag[HelloThere], it worked as I needed it to.

David Gifford
Mexico team leader, Mexico City

Resonate Global Mission
Engaging People. Embracing Christ.
A Ministry of the Christian Reformed Church
resonateglobalmission.org



--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/M4GZ1iX8oyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/87c896cc-ea8d-46b0-a474-bfd50a29f791%40googlegroups.com.

David Gifford

unread,
Mar 6, 2020, 7:33:56 AM3/6/20
to tiddl...@googlegroups.com
Thanks Luis, for this option as well.




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/M4GZ1iX8oyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

David Gifford

unread,
Mar 6, 2020, 7:38:47 AM3/6/20
to tiddl...@googlegroups.com
Oh, and sorry, everyone, I answered from email and forgot to remove my long and religious signature from my response to Mark. Some here have objected to that, and while I believe in free speech and am not embarrassed about my religious beliefs, I am sensitive to the fact that some here might see it as in-your-face proselytism, so I try to avoid that. It is a signature required by my employer. Please don't derail the thread by replying about this topic. I just wanted to preclude any objections anyone might have.

Reply all
Reply to author
Forward
0 new messages