Filter to search for transclusions that do not exist...

82 views
Skip to first unread message

Jan

unread,
Aug 25, 2017, 5:27:51 AM8/25/17
to TiddlyWiki
Hello,
I got a problem that I cannot solve yet. I would like to have a filter
to track down transclusions that do not exist (Per Tiddler and in the
whole wiki...).
Any Ideas how to do this?

Hello Thomas... Is this a task for the extract Macro?

Best wishes
Jan

Jan

unread,
Aug 25, 2017, 9:46:58 AM8/25/17
to TiddlyWiki
Hej,
for all seeking a solution:
It can be done with Thomas Elingers superbe Extract-plugin:
http://tid.li/tw5/hacks.html#Extract%20Macro

\define extrans0()
<$macrocall $name="extract" start="{{" end="}}" prefix="[[" suffix="]]"
mode="inline" limit="no"/>
\end
\define exitrans1()
<$list filter="[list[$:/StoryList]!is[system]]">
<<extrans0>></$list>+[!has[created]]
\end

<$wikify name="trans" text=<<exitrans1>>>
<$list filter=<<trans>>>
<<currentTiddler>></$list>
</$wikify>

cheers Jan

Thomas Elmiger

unread,
Aug 27, 2017, 1:47:59 PM8/27/17
to TiddlyWiki
Cool, you found a way to do it, Jan! And even using one of my macros. That makes me a bit proud of both of us ;–)

Sorry, I am a bit slow at the moment. But great to see there are people like you that are able to find a solution themselves and publish it again to benefit others.

Herzliche Grüsse,
Thomas

Jan

unread,
Aug 28, 2017, 4:41:59 AM8/28/17
to tiddl...@googlegroups.com
Hello Thomas.
Extract is a really great thing which makes possible a lot of things. I
wish it were part of the core for it would be much easier to to plugins
using it. Could you open a pull-request for it?

Yours Jan

Thomas Elmiger

unread,
Sep 2, 2017, 8:14:16 AM9/2/17
to tiddl...@googlegroups.com
Hi Jan

I am glad you like the extract macro (I like it myself too) – but I am afraid it is still too experimental or at least not documented well enough to become part of the core. Also it might be possible to get the same result with a much more efficient JavaScript macro … so I am afraid it is not the right time to make a pull request.

Of course you may use extract in plugins you make or "bundle" it with other tiddlers so other people can use your solutions easily.

If you wish to get "something like the extract macro" in the core, you could open an issue on github:
https://github.com/Jermolene/TiddlyWiki5/issues

All the best,
Thomas
Reply all
Reply to author
Forward
0 new messages