Thanks very much for the details! Thanks, Beinan
On Thu, May 14, 2015 at 4:40 PM, PMario <[email protected]> wrote: > On Thursday, May 14, 2015 at 8:24:28 PM UTC+2, Kakyo wrote: >> >> Thanks Mario! Worked like a charm! >> > > Good :) > > >> I'm not a web developer. Does this mean that there is a set of exposed >> object API one can call to manipulate the entire wiki in the developer >> console? >> > > Yes. We are in browser Javascript-land where the environment is sandboxed, > but everything is public ;) > Basically the whole TW functionality is covered in $tw. The $tw.wiki.xxx > functions manipulate the TW internal data store. > > If so, where is the API doc? >> > > :) In normal cases I's say read the tests [1], but I have to say: Read the > source. Especially: boot.js[2] and wiki.js [3]. may be tiddler.js > Test coverage is at minimum. IMO contribution would be very welcome :) > > IMPORTANT: Backup, backup, backup. if you play with your data! > > WARNING: If you use those functions in the console, you have the > possibility to mess things up, in a way, that may not be obvious and may > cause problems in the future. eg: field names with possible but illegal > characters like spaces > > Using "read" functions like $tw.wiki.getTiddler(), .filterTiddlers() ... > are not problematic, since they don't modify the store. > > On the other hand: .addTiddler(), .deleteTiddler(), ... may give you > unexpected results. Eg. .addTiddler() needs the right tiddler fields, so > tiddlers show up in the right sidebar ... > > So you are welcome to play with it. .. But use a TestTW instead of your > production data :) > > have fun! > mario > > [1] > https://github.com/Jermolene/TiddlyWiki5/tree/master/editions/test/tiddlers/tests > [2] https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js > [3] > https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/wiki.js > > > -- > 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/o8v3_Y4cJNM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/33583101-d72a-49eb-960d-9faec928fa11%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/33583101-d72a-49eb-960d-9faec928fa11%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAPbpa4TMnAA-AnOOAfNgdXKQQpt%2B6pDANLb0VoY%2BgX1qfMX17w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

