Export each tiddler plugin?

302 views
Skip to first unread message

Dave Gifford - http://www.giffmex.org/

unread,
Jun 27, 2017, 9:13:37 AM6/27/17
to TiddlyWiki
Hi all

I can't remember if there is a plugin that allows you to export all tiddlers at once as separate static html's, one for each tiddler. That would be helpful for me at times when I update the Stylesheet for TiddlyWiki files I use to generate statics, but don't want to export each tiddler separately to update the online version. I seem to remember once trying out a plugin that even operated by tags, but I can't remember now a) where it is or b) whether it opened a river of tiddlers and exported the whole river, or if it exported each tiddler separately.

Does anyone know if it exists and where to find it? Or if it doesn't exist, if such a thing is possible?

FYI at http://articulos.giffmex.org/ I have over 1300 statics generated from TW5s.

Dave

Mark S.

unread,
Jun 27, 2017, 1:17:17 PM6/27/17
to TiddlyWiki
It looks like node.js and the --rendertiddlers option is made for something like that. I wonder how the linking works after the exporting?

Mark

David Gifford

unread,
Jun 27, 2017, 1:33:22 PM6/27/17
to tiddl...@googlegroups.com
Yeah I would prefer something for standalone, not for node.js.

I found the Exporter macro I was referring to, but it exports the entire river of tiddlers...

Dave

David Gifford
Resonate Global Mission, Mexico City


--
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/qUTYW1knPXo/unsubscribe.
To unsubscribe from this group and all its topics, 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/79be6f64-0592-480c-ba78-f423de9451f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark S.

unread,
Jun 27, 2017, 1:46:53 PM6/27/17
to TiddlyWiki
It's de ja vu all over again. We had this same discussion in March!

What is the exporter macro you mention? Maybe it would be possible to put it in a loop so a single click could do an export. Hmm 1300 clicks = 1300 seconds =~ 1/2 hours.

Also, do you have the all-up version of your document somewhere?

Thanks,
Mark


On Tuesday, June 27, 2017 at 10:33:22 AM UTC-7, David Gifford wrote:
Yeah I would prefer something for standalone, not for node.js.

I found the Exporter macro I was referring to, but it exports the entire river of tiddlers...

Dave

David Gifford
Resonate Global Mission, Mexico City


On Tue, Jun 27, 2017 at 12:17 PM, 'Mark S.' via TiddlyWiki <tiddl...@googlegroups.com> wrote:
It looks like node.js and the --rendertiddlers option is made for something like that. I wonder how the linking works after the exporting?

Mark

On Tuesday, June 27, 2017 at 6:13:37 AM UTC-7, Dave Gifford - http://www.giffmex.org/ wrote:
Hi all

I can't remember if there is a plugin that allows you to export all tiddlers at once as separate static html's, one for each tiddler. That would be helpful for me at times when I update the Stylesheet for TiddlyWiki files I use to generate statics, but don't want to export each tiddler separately to update the online version. I seem to remember once trying out a plugin that even operated by tags, but I can't remember now a) where it is or b) whether it opened a river of tiddlers and exported the whole river, or if it exported each tiddler separately.

Does anyone know if it exists and where to find it? Or if it doesn't exist, if such a thing is possible?

FYI at http://articulos.giffmex.org/ I have over 1300 statics generated from TW5s.

Dave

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

David Gifford

unread,
Jun 27, 2017, 2:59:41 PM6/27/17
to tiddl...@googlegroups.com
Hi Mark

I use a number of documents, one per major topic. I have attached one to the present email.

I have also put the Exporter macro in there so you can get at it, in the system tiddlers tab.

Dave

David Gifford
Resonate Global Mission, Mexico City


To unsubscribe from this group and all its topics, 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.
filosofia.arts.html

Dave Gifford - http://www.giffmex.org/

unread,
Jun 27, 2017, 3:01:40 PM6/27/17
to TiddlyWiki
Hi Mark

Doesn't look like my email sent, so let me do this directly in Google groups.

I use a number of documents, one per major topic. I have attached one to the present message.

I have also put the Exporter macro in there so you can get at it, in the system tiddlers tab.

filosofia.arts.html

Mark S.

unread,
Jun 27, 2017, 8:20:51 PM6/27/17
to TiddlyWiki
Hi Dave,

The rendertiddlers process doesn't put the styles into individual tiddlers like the ones on your articles page. Possibly a batch file could be made that would create a usable exported tiddler, but I decided to concentrate on your original request.

Here's what I got so far. TW was doing all sorts of weird things that I've never seen before but at the last I came across an approach that seems to work. Code:

\define quotedCurrent() """$(currentTiddler)$"""

<$list filter="[tag{$:/temp/myfavtag}]">
<$button>Save: <<currentTiddler>>
<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/exporters/StaticRiver" exportFilter=<<quotedCurrent>> filename=<<quotedCurrent>>/>
</
$button><br/>
</$list>

---

List tiddlers to export with this tag: <$edit-text tag="input" width="50" placeholder="Tag name" tiddler="$:/
temp/myfavtag"/><br/>

---


Copy and paste into an empty tiddler.

Just put in the name of the tag representing the tiddlers you want to export. Click on each button of each tiddler that you want to export. It will offer you a sanitized file name to save under. Click and save. Since you don't have to open, click on export, and select export type I think you'll find the process fairly efficient.

You can change the filter if you don't want to filter by tags, of course.

Of course, always have backups.

Mark

Mark S.

unread,
Jun 27, 2017, 8:33:57 PM6/27/17
to TiddlyWiki
Oh, I just realized. If your browser isn't set to ask you how to save, the workflow will be *very* fast but (1) the files will be saved without an .html extension (2) the files will be saved with the sanitized name by default (3) the files will be in your designated download directory.  The code can be changed to fix (1) and you can set your preferred download directory to fix (3). But (2) means that you might need to go back to change the filenames.  If each tiddler had a safe "filename" field (a name that meets system requirements and won't be sanitized) then the code could be changed to use that field, so that future updates would be relatively painless.

Mark

Mark S.

unread,
Jun 28, 2017, 12:19:43 AM6/28/17
to TiddlyWiki

Ok, here we go. If you have your browser set with a default download directory, then this code can export a bunch of tiddlers all at once:

\define quotedCurrent() $(currentTiddler)$
\define filename() $(currentTiddler)$.html

List
 tiddlers to
export with this tag: <$edit-text tag="input" width="50"
 placeholder
="Tag name" tiddler="$:/temp/myfavtag"/><br/>

---

<$button>Save the following tiddlers
<$list filter="[tag{$:/temp/myfavtag}]">
<$action-sendmessage
 $message
="tm-download-file"
$param
="$:/core/templates/exporters/StaticRiver"
exportFilter
=<<quotedCurrent>>

filename
=<<filename>>/>
</
$list>
</$button>


<$list filter="[tag{$:/temp/myfavtag}]">
<<currentTiddler>><br/>
</$list>

HTH
Mark

David Gifford

unread,
Jun 28, 2017, 10:40:36 AM6/28/17
to tiddl...@googlegroups.com
Wow Mark! I have other stuff on my plate today but I will soon give that a go! Thank you so much for your help.

David Gifford
Resonate Global Mission, Mexico City


--
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/qUTYW1knPXo/unsubscribe.
To unsubscribe from this group and all its topics, 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.

David Gifford

unread,
Jun 29, 2017, 1:26:33 PM6/29/17
to tiddl...@googlegroups.com
"Oh hi Mark" (sorry, I have been watching videos about Tommy Wiseau)

I tried out your solution and substituted [!is[system]is[tiddler]] in two places, and now I can download all tiddlers regardless of tag, which is what I really wanted. Works great! Thank you again for your help.

Dave

David Gifford
Resonate Global Mission, Mexico City


wjam

unread,
Dec 29, 2017, 8:07:42 AM12/29/17
to TiddlyWiki
Thanks Mark,
 
I needed something like this. Some tiddler titles have spaces so I had to replace

\define quotedCurrent() $(currentTiddler)$
by
\
define quotedCurrent() '$(currentTiddler)$'

The single quotes were probably removed by some semi-intelligent operating system, browser or webhosting party.

KR wjam
Reply all
Reply to author
Forward
0 new messages