Query: TIDDLER structure & BULK operations

98 views
Skip to first unread message

Josiah

unread,
Jun 19, 2016, 5:15:02 AM6/19/16
to TiddlyWiki
Ciao

I have looked at the structure of normal tiddlers and they look to be simple data records, functionally rather like those in a flat-file database.

I been toying with the idea of mass conversion of texts to TW with the texts pre-chunked directly to tiddler format.

As far as I can see it would be quite easy to write tiddlers directly into an empty TW, rather than have to go through the extra step of JSON import.

BUT I was just wondering if that might create problems on internal indexing? What I mean is on IMPORT is more than the record created that would prevent the bulk written-in Tiddlers being fully accessible?

Best wishes
Josiah

Jeremy Ruston

unread,
Jun 19, 2016, 5:45:07 AM6/19/16
to tiddl...@googlegroups.com
Hi Josiah

I think you're asking whether it is possible to splice tiddler records directly into the HTML file. The answer is that it, yes, absolutely it works fine: it is in fact how serversides like TiddlyWeb work; they figure out which tiddlers should be included, and then insert their <div> representation into the empty.html file.

Best wishes

--
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/caa9c461-e7d3-49a2-99d7-93d8361d17e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PMario

unread,
Jun 19, 2016, 5:57:22 AM6/19/16
to TiddlyWiki
Hi Josiah,

The TW "indexing" is created on the fly. .. So you should be able to modify the html file directly. ... BUT ... You need to take care of some "html" escaping and you need to do some code sanitation, to avoid "evil code".

eg: remove <script> tags, remove onXXX events and so on. .. but if you import stuff from text and not from  html pages, you probably can forget about the sanitation.

Just some html escaping will be needed.

-m

Josiah

unread,
Jun 19, 2016, 7:49:07 AM6/19/16
to TiddlyWiki
Ciao Mario

I noticed that html escaping is important and I would need to understand that better.

But its great "indexing" is done on the fly. That opens up lots of possibilities for auto-creation.

Best wishes
Josiah

Josiah

unread,
Jun 19, 2016, 8:09:22 AM6/19/16
to TiddlyWiki
Ciao Jeremy

That is a rather marvelous thing. I don't know anything else that you could directly insert babies into that the parent could sort out so neatly.

Josiah
Reply all
Reply to author
Forward
0 new messages