[TW5] Possible to reveal where a missing tiddler is mentioned?

386 views
Skip to first unread message

Matthew Petty

unread,
Apr 5, 2018, 3:14:18 AM4/5/18
to TiddlyWiki
I am going through and finding all my missing tiddlers. It's just a housekeeping thing - I don't know if it's worth it.

I have a table like this:
<$count filter="[all[missing]]"></$count> missing tiddlers.

<table class="SmallTable">
<thead>
<tr>
<td>Missing</td>
<td></td>
<td></td>
<td></td>
<td>Linked to by</td>
</tr>
</thead>
<$list filter="[all[missing]sort[date]random[10]]">
<tr>
<$list filter="[list[Lists/Missing - Table with links]]" variable="mytag">
<td><$checkbox tag=<<mytag>>> <<mytag>>?</$checkbox></td>
</$list>
<td>
{{!!title||$:/core/ui/Buttons/edit}}  
<$link to={{!!title}}>
<$view field="title"/>
</$link>
</td>
<td>
???? WHAT GOES HERE????
</td>
</tr>
</$list>
</table>

and a list of tags to use for the checkboxes: person abbreviation location org list tool role date

That gives a table with a random selection of 10 missing tiddlers, and checkboxes so I can easily set their tags so they show up in lists correctly (and this creates the tiddler at the same time).


What could I put in the last column to reveal which tiddler mentions the missing tiddler? I might want to go there and change it.

I tried: <<list-links-with-edit "[all[current]backlinks[]sort[title]]">>
But that returned nothing, because you can't backlink to something that doesn't exist.

Then I tried: <$list filter="[search[{{!!title}}]]"></$list>
But that returned a bunch of stuff I don't understand.

Any ideas?

PMario

unread,
Apr 5, 2018, 4:57:02 AM4/5/18
to TiddlyWiki
Hi Matthew,


On Thursday, April 5, 2018 at 9:14:18 AM UTC+2, Matthew Petty wrote:

Then I tried: <$list filter="[search[{{!!title}}]]"></$list>
But that returned a bunch of stuff I don't understand.

try this: <$list filter="[search[{{!!title}}]]"><<currentTiddler>><br></$list>

-m

Matthew Petty

unread,
Apr 5, 2018, 7:50:56 AM4/5/18
to TiddlyWiki
That doesn't seem to work - it returns a long list of tiddler titles, but not ones that seem related to the missing one, or the tiddler containing the overall list.
It shows the same list of titles for every missing tiddler in the table, including $core. The list of titles returned go from $ to A to Z, but is not a list of all tiddlers in the wiki. They don't seem to have anything in common (tags etc).

Stephan Hradek

unread,
Apr 5, 2018, 10:10:59 AM4/5/18
to TiddlyWiki
I'd like to understand the issue, soI've put your tiddler into a "New Tiddler" on tiddlywiki.com.

It shows 189 missing tiddlers, but the table is empty,

What do I need to do in order to see what you see?

Mark S.

unread,
Apr 5, 2018, 11:09:14 AM4/5/18
to TiddlyWiki
 You could have a button process that runs 3 different list-based actions. The first one finds all the missing tiddlers and then creates them, tagging them with "Delete". The 2nd finds the backlink tiddlers and tags them with "HasMissing". The 3rd set deletes all tiddlers tagged with "Delete".

-- Mark

Mat

unread,
Apr 5, 2018, 4:54:05 PM4/5/18
to TiddlyWiki

try this: <$list filter="[search[{{!!title}}]]"><<currentTiddler>><br></$list>


I have no idea if the logic is correct, but the syntax is probably wrong. It should probably be; 

 <$list filter="[search{!!title}]"><<currentTiddler>><br></$list>


<:-)

Matthew Petty

unread,
Apr 7, 2018, 1:25:11 PM4/7/18
to TiddlyWiki
Mat,
That worked! Now it shows the tiddler where that missing title is mentioned. In some cases it's in a Base64 tiddler which happens to have the correct string. 

Mat

unread,
Apr 7, 2018, 4:27:37 PM4/7/18
to TiddlyWiki
On Saturday, April 7, 2018 at 7:25:11 PM UTC+2, Matthew Petty wrote:
Mat,
That worked! Now it shows the tiddler where that missing title is mentioned. In some cases it's in a Base64 tiddler which happens to have the correct string. 

(all cred should go to PMario)

<:-)

Matthew Petty

unread,
Apr 8, 2018, 7:36:07 AM4/8/18
to tiddl...@googlegroups.com
Thank you PMario!
Now there's 2 little things to do.
1. Only find the missing title if it is wrapped in [[]]
2. Make the listed source tiddler a link

I tried to use a macro and  variable to set the title being searched for be "[[" & search text & "]]", but again the syntax for including a variable tripped me up
I have:
<td><$list filter="[search{!!title}]"><<currentTiddler>><br></$list></td>
<td><$set name="title_with_brackets" value=<<join3 "[[" {{!!title}} "]]">> ><$list filter="[search[<<title_with_brackets>>]]"><$link to={{!!title}}><$view field="title"/></$link><br></$list></$set></td>

The first <td> finds all occurrences of the string. The second one should only show the actual source of the missing tiddler. But instead it just shows a link to the Missing List that this table is in. "join3" is a simple concatenation macro that joins 3 items.

For example, in one table row there is the missing tiddler "MM". The first column shows every tiddler that contains the string "MM". The second column only shows the current tiddler. If I search for "[[MM]]" I find where I referred to it.



--
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/fJAcHM9MK2I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b6408223-4223-470b-9215-06b42ed6b9b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Best regards,

Matthew
+971 (0)54 442 0409

Reply all
Reply to author
Forward
0 new messages