Hi Josh That code is amazing, is there a way of copying it, saving it, and then > having tiddlywiki recognise all that code and recreate your tiddlers with > tags? Or is that Javascript just a much faster way of copying the contents > of your tiddlers into notepad and then rebuilding all the tiddlers again. >
Yes, this example dumps all your tiddlers in a format that you can copy and paste into a *.JSON file, and then import back into TW5: var t=[];$tw.wiki.forEachTiddler(function(title,tiddler){var d = {};t.push(d);for(name in tiddler.fields) {d[name] = tiddler.getFieldString(name);};});JSON.stringify(t,0,2) It's also in this pastebin: http://pastebin.com/w3DnxiXf At the moment, the JSON importer won't import custom fields, just the basic set of core fields. I'll fix that if it's useful to people. Best wishes Jeremy. > For example the other day when mine crashed I copied every tiddler title > and content into notepad and then manually copied and pasted each one back > saving as I went. > > 1. Jeremy, from what I can see your JS method basically reduces the time > taken to copy and paste tiddlers into notepad, instead of copying each > tiddler one by one, you can copy the contents, titles tags and body of all > the tiddlers in your TW in one swoop. Cool! > > 2. Is the output from that JS query capable of formatting the tiddlers in > such a way that I could copy all that text and ask tiddlywiki to import > them again, creating new tiddlers with those titles tags and content? Or is > it just a much faster way of saving the contents of all your tiddlers into > notepad as I described in [1]? > -- Jeremy Ruston mailto:jeremy.rus...@gmail.com -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.