List filter needed

98 views
Skip to first unread message

David Gifford

unread,
May 17, 2020, 9:52:31 AM5/17/20
to TiddlyWiki
Hi all

What list filter would I use to produce a list of tiddlers with no links in them?

Mark S.

unread,
May 17, 2020, 12:10:09 PM5/17/20
to TiddlyWiki

Since there's no "haslink" operator, I don't think it can be done with just a simple filter. Here's what seems to work:


\define unlinked-tiddlers()
<$vars lb="[[[[" rb="]]]]">
<$list filter="[all[tiddlers]]">
<$list filter="[all[current]links[]limit[1]]" variable="dummy" emptyMessage={{{ [<currentTiddler>addprefix<lb>addsuffix<rb>] }}}>
</$list>
</
$list>
</$vars>
\end

<$wikify name="unlinked" text=<<unlinked-tiddlers>>>
<$list filter="[enlist<unlinked>]">

</
$list>
</$wikify>


Mat

unread,
May 17, 2020, 1:18:37 PM5/17/20
to TiddlyWiki
I don't quite understand Marks solution so maybe that one is better, or just maybe it is exactly what I'm proposing here: I'd think the easier strategy would be to filter all tiddlers and then remove the ones that do have links to them. I believe you've solved the latter in your previous efforts with backlinks, so you'd do something like

[all[tiddlers]] -[<allwithlinks>]

(I'm not 100% sure of the "minus" syntax, but it's something like that)

<:-)

Mark S.

unread,
May 17, 2020, 1:45:04 PM5/17/20
to TiddlyWiki
How do you get <allwithlinks> ??

Mat

unread,
May 17, 2020, 2:19:47 PM5/17/20
to TiddlyWiki
Mark S. wrote:
How do you get <allwithlinks> ??

My assumption is that David wants all titles that are not backlinks (whatever is included in that term), and I believe he has solved how to get all backlinks. So I just mean "all tiddlers minus all backlinks". Maybe I misunderstood.

<:-)

David Gifford

unread,
May 17, 2020, 3:23:27 PM5/17/20
to tiddl...@googlegroups.com
Don't assume anything...what I need is for making sure I have added links to parent categories in all topic tiddlers, in my personal system. So I need a list of tiddlers with no links in them in the text field.

--
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/w8dwIp8wCMM/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/ffbb7dde-a56a-49b9-ba41-bb6444aa7a3b%40googlegroups.com.

David Gifford

unread,
May 17, 2020, 3:24:57 PM5/17/20
to tiddl...@googlegroups.com
And thanks Mark, I will try your solution in a little while.

si

unread,
May 17, 2020, 3:39:05 PM5/17/20
to TiddlyWiki
I think this is what Mat was getting at:

<$list filter="[all[tiddlers]] -[all[tiddlers]backlinks[]]">
<
<currentTiddler>>
<br>
</$list>

Mark S.

unread,
May 17, 2020, 4:14:28 PM5/17/20
to TiddlyWiki
That would be, "All tiddlers with no backlinks to them." So I guess the question is what the question is.

si

unread,
May 17, 2020, 4:27:13 PM5/17/20
to tiddl...@googlegroups.com
I believe Mat is correct here. Backlinks are just tiddlers that link to a particular tiddler. If you return the backlinks for all tiddlers, you get every tiddler that contains a link.

[all[tiddlers]] -[all[tiddlers]backlinks[]] = all tiddlers that are not backlinks = all tiddlers that don't link to another tiddler = all tiddlers without links

David Gifford

unread,
May 17, 2020, 4:30:28 PM5/17/20
to tiddl...@googlegroups.com
Ah, now I understand. I was thinking backwards. Thanks!

On Sun, May 17, 2020, 3:27 PM si <matthew...@gmail.com> wrote:
I believe Mat is correct here. Backlinks are just tiddlers that link to a particular tiddler. If you return the backlinks for all tiddlers, you just get every tiddler that contains a link.

[all[tiddlers]] -[all[tiddlers]backlinks[]] = all tiddlers that are not backlinks = all tiddlers that don't link to another tiddler = all tiddlers without links

On Sunday, 17 May 2020 21:14:28 UTC+1, Mark S. wrote:
That would be, "All tiddlers with no backlinks to them." So I guess the question is what the question is.

On Sunday, May 17, 2020 at 11:19:47 AM UTC-7, Mat wrote:
Mark S. wrote:
How do you get <allwithlinks> ??

My assumption is that David wants all titles that are not backlinks (whatever is included in that term), and I believe he has solved how to get all backlinks. So I just mean "all tiddlers minus all backlinks". Maybe I misunderstood.

<:-)

--
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/w8dwIp8wCMM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

TonyM

unread,
May 17, 2020, 7:21:23 PM5/17/20
to TiddlyWiki
David,

Reflecting on this thread, I was thinking are you looking for tiddlers that are not "referenced" in your wiki; I thought perhaps a more general test may be;

[all[tiddlers]] -[all[tiddlers]links[]]

But then looking at my own reference wiki I could even exclude tiddlers that have tags as these are organised by tag, and those that are themself tags
Then we are going beyond orphans 
orphansall tiddlers to which there are no hard links
Regards
Tony


On Monday, 18 May 2020 06:30:28 UTC+10, David Gifford wrote:
Ah, now I understand. I was thinking backwards. Thanks!

On Sun, May 17, 2020, 3:27 PM si <matthew...@gmail.com> wrote:
I believe Mat is correct here. Backlinks are just tiddlers that link to a particular tiddler. If you return the backlinks for all tiddlers, you just get every tiddler that contains a link.

[all[tiddlers]] -[all[tiddlers]backlinks[]] = all tiddlers that are not backlinks = all tiddlers that don't link to another tiddler = all tiddlers without links

On Sunday, 17 May 2020 21:14:28 UTC+1, Mark S. wrote:
That would be, "All tiddlers with no backlinks to them." So I guess the question is what the question is.

On Sunday, May 17, 2020 at 11:19:47 AM UTC-7, Mat wrote:
Mark S. wrote:
How do you get <allwithlinks> ??

My assumption is that David wants all titles that are not backlinks (whatever is included in that term), and I believe he has solved how to get all backlinks. So I just mean "all tiddlers minus all backlinks". Maybe I misunderstood.

<:-)

--
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/w8dwIp8wCMM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

David Gifford

unread,
May 17, 2020, 7:33:18 PM5/17/20
to tiddl...@googlegroups.com
Thanks everyone...and then when I went to implement, I found that I had already done it (or found it) recently, but had forgotten already, and hadn't made the solution very visible in my wiki. Sorry to waste your time! Here is what I had:

<$list filter="[!is[system]sort[title]]">
<$list filter="[all[current]links[]limit[1]]" emptyMessage=<<emptymessage>>>
</$list>
</$list>

I am going to document this on the toolmap...


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/ab42e823-59c8-400e-a426-fa88c03a7bd7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages