Converting a WikiFile to a WikiFolder from the command line or a nodejs environment?

110 views
Skip to first unread message

Matthew Lauber

unread,
Dec 1, 2016, 1:48:29 PM12/1/16
to TiddlyWiki
All, 
   I'm working on a task where I need to convert a tiddlywiki file into a wiki folder.  I'm really not picky about the process, so long as I can automate it.  Right now, I've tried 
tiddlywiki /path/to/wikifolder --load wikifile.html --init server
tiddlywiki
/path/to/wikifolder  --init server --load wikifile.html
tiddlywiki
/path/to/wikifolder --load wikifile.html --savetiddlers [all[tiddler+system]] /tmp/test2/tiddlers
tiddlywiki /path/to/wikifolder --load wikifile.html ---rendertiddlers [all[tiddlers]] $:/core/templates/tid-tiddler /path/to/wikifolder/tiddlers text/vnd.tiddlywiki .tid



None of these actually build the folder structure the same way that a wikifolder does.  And AFAIK, there is not 
tiddlywiki --load wikifile.html --save /path/to/wikifolder


If anyone has some advice I'd love some help.  


Matt Lauber

Jeremy Ruston

unread,
Dec 1, 2016, 5:09:03 PM12/1/16
to tiddl...@googlegroups.com
Hi Matt

All, 
   I'm working on a task where I need to convert a tiddlywiki file into a wiki folder.  I'm really not picky about the process, so long as I can automate it.  Right now, I've tried 
...
None of these actually build the folder structure the same way that a wikifolder does.  And AFAIK, there is not 
tiddlywiki --load wikifile.html --save /path/to/wikifolder

The process I use for splitting TW HTML files into individual .tid files is shown in ./bin/ginsu.sh. The critical lines are:

node ./tiddlywiki.js \
./editions/empty \
--verbose \
--load $1 \
--output tmp \
--rendertiddlers [!is[system]] $:/core/templates/tid-tiddler ginsu text/plain .tid

In terms of folder structure, all the .tid files end up in the same directory.

You can see an example of a more complex splitting process in the translator edition, where separate rendertiddlers commands are used for each directory of output files:


Is that what you need?

Best wishes

Jeremy



If anyone has some advice I'd love some help.  


Matt Lauber

--
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+...@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/2f062ac4-effa-4457-a7ed-78a0a349e662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Lauber

unread,
Dec 1, 2016, 7:02:51 PM12/1/16
to TiddlyWiki
That's what I needed. The lack of the noclean option was what was confusing me.
Reply all
Reply to author
Forward
0 new messages