confused again about saving filters

102 views
Skip to first unread message

Danielo Rodríguez

unread,
Jul 30, 2017, 6:41:12 AM7/30/17
to TiddlyWiki
Hello,

Here I am again confused about saving filters. This happens to me from time to time, more or less every time I have to deal with save filters: they're confusing, they're not very documented and they are very different and similar at the same time to each other.

My question today is about the difference between two filters, one is $:/core/save/empty and the other is $:/editions/tw5.com/download-empty. Below you can see the respective contents:


title: $:/core/save/empty

\define saveTiddlerFilter()
[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end
{{$:/core/templates/tiddlywiki5.html}



title: $:/editions/tw5.com/download-empty
\define saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end
\define savingEmpty()
yes
\end
{{$:/core/templates/tiddlywiki5.html}}
 



From the title, I understand that both are intended to generate an empty tiddlywiki, but that is all that I can understand. The first just takes care of including system tiddlers and removing the ones that are hardcoded at the template, while the second just includes core, a couple of temes and the same exclusions. What is the reason of this difference ?
I have also discovered (the hard way) that the second one (download empty) totally ignores the plugins defined at tiddlywiki.info. This made me think that the second is not suitable for nodejs wiki generation, and is only meant to be used when you download the wiki from the browser. I don't understand why are they so different, if someone could explain me it a bit more.

Also I don't understand the role of the savingEmpty macro. Why the first one does not include this macro if it is meant to generate an empty wiki ? What does that macro do exactly ?

Thanks in advance

Danielo Rodríguez

unread,
Aug 2, 2017, 1:56:44 PM8/2/17
to TiddlyWiki
No one has an answer huh?

Jeebus K

unread,
Aug 2, 2017, 5:15:17 PM8/2/17
to TiddlyWiki
I'm a newbie too, I don't really understand filters yet or macros for that matter.

Just looking at the code the download-empty looks similar except for the system vs core/encrypted and the two themes.
I wouldn't assume that savingEmpty() has any effect on saveTiddlerFilter() but I really don't know.
If I had to guess probably the download allows it to work correctly through https...

Arlen Beiler

unread,
Aug 2, 2017, 5:29:46 PM8/2/17
to TiddlyWiki
saveTiddlerFilter is a macro that apparently get's called by $:/core/templates/tiddlywiki5.html. Same with saveEmpty. The two tiddlers are used for two different purposes. If you copy the filter into the advanced search filter tab on TiddlyWiki.com you can see the list of tiddlers that match the filter. I'm as puzzled as you are about the second one, as none of the exclusions are there in the first place. It is essentially [[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] +[sort[title]]

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@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/2086174c-c574-4ede-a361-58aea382e817%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Arlen Beiler

unread,
Aug 2, 2017, 5:33:41 PM8/2/17
to TiddlyWiki
Actually, I think $:/core/save/empty is intended to be used with the TiddlyWiki NodeJS server command. It would load all of the system tiddlers but none of the content tiddlers on the initial load. Everything else would have to be discovered by the skinny tiddler system.

$:/editions/tw5.com/download-empty appears to be the download empty button on TiddlyWiki.com.

-Arlen

Danielo Rodríguez

unread,
Aug 3, 2017, 7:18:37 AM8/3/17
to TiddlyWiki
The exclusions are the only part that make sense to me. Both boot and bootprefix are backed into the HTML file,so there is no need to include them as part of the list of tiddlers. I never looked for the macros inside the HTML template, maybe they are there
Reply all
Reply to author
Forward
0 new messages