It feels like I've dealt with this before but never actually asked it 
explicitly:

Is there any way to make TW5 (not node.js version) read and process (is the 
word "wikify"?) a file, e.g a json file with tiddlers?

Must it take a manual drag-n-drop to import e.g a json file, couldn't it be 
done in some more automatic way?

What if the file is stored fully locally, even in same folder as the TW?


In reading articles like the following (and understanding a fraction) it 
really feels like it should be possible after all...

Reading files in JavaScript using file APIs 
<http://www.html5rocks.com/en/tutorials/file/dndfiles/>, including among 
other things a demo where you can slice out parts from a TW.

HTML imports <http://www.html5rocks.com/en/tutorials/webcomponents/imports/>. 
Assumes CORS but I think a great part of reading file needs is for locally 
stored files. (And if you store your TW in a sky folder that even others 
could put stuff into then...)



Partly inspired from the articles, here are some arbitrary synaptic 
snapshots from a happy *non-coder*:

   - A hard coded "port" in TW core (or a plugin), with a transclusion-like 
   interface that takes some file address. The TW file is processed from top 
   and reaches the transclusion...takes sidestep to run through the 
   transcluded file.. then stepping back in again to continue in the TW file...
   - The external file name sneakily contains the content. In trying to 
   call "Foo*.*" the OS or browser answers that "no you cannot read 
   *FooHereisreallythecontentofthefile.txt* as it is an external file" to 
   which TW says thank you.
   - A hardcoded div(?) that is really a permanent address+filename so that 
   any filed saved with that name is accepted (..somehow)
   

Reversing the omelet, looking instead at the file to be imported. 

   - The exploding bottom technique; the file cointains the content but 
   also the "end of a TW file"  (</body></html> ?). Part of the process to 
   insert it into the TW is to delete the TW file ending and replace it 
   (append) the external file."
   - The file thinks he is the center of the universe and imports the TW 
   around himself. It reads the TW code down to a marker, copies this to above 
   its own content, and then under the content applies a copy of the rest of 
   the TW code. He then makes coffee for you and fetches your slippers.


<:-)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/cfd0cbb8-a26c-445a-99af-8a5c3fffc823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to