db driver to query TiddlyWikis from Excel, Access, node.js, external client-side JS, etc.? Querying SQL/MongoDB from a TW?

386 views
Skip to first unread message

madscijr

unread,
Jun 6, 2016, 10:46:28 AM6/6/16
to TiddlyWiki
Has anyone done any work on making TiddlyWiki available as a data source (like ODBC or otherwise) to say, Excel/Access, or server/client-side JavaScript? 

Going the other way, are there any plugins for or work being done on using TiddlyWiki as a database client for RDBMSs (SQL Server, Oracle, MySQL, PostGres) and/or document-based DBs like MongoDB?  And perhaps a tool to import rows or documents from a query as tiddlers, or to export tiddlers to records in an external DB? 

I'm nowhere near an advanced enough programmer to build these kinds of things on my own, but I would imagine it's possible, and I could definitely imagine myself using these...

Jed Carty

unread,
Jun 6, 2016, 11:03:15 AM6/6/16
to TiddlyWiki
I have been looking into some things like this but it is one of many projects I am working on. I believe that some other people have expressed interest in creating plugins for it but I haven't seen any results yet.

One thing I have been looking at is using a mysql database as a personal email database with a tiddlywiki front-end. None of it is particularly difficult, it is just that like everyone else who contributes to tiddlywiki I have approximately 6709389214 simultaneously running projects and only about half involve tiddlywiki in some way. Unfortunately none of the tiddlywiki projects pay the bills yet so it isn't the first priority for any of us at the moment.

madscijr

unread,
Jun 6, 2016, 11:29:03 AM6/6/16
to TiddlyWiki
I hear you on finding free time / priority for this stuff. 
And you bring up a good point, about TiddlyWiki projects paying the bills. 
If TiddlyWiki had that kind of interoperability with SQL & NoSQL databases, or could be used as a type of document-oriented database, or as a front end / tool for such, it would probably gain traction in the business world.  
I have tried to champion TiddlyWiki at a number of places I've worked, and as useful and powerful as it can be, it's still kind of proprietary and limited. 
On the front end side, the #1 complaint I've seen is, you can't just paste rich text into it like you can in Microsoft Word, and have it "just work". 
Or for instance, you should be able to select a range of cells in Excel, and paste it into a tiddler, and a table is automatically created. 
I know there are wysiwyg editors out there, but haven't had much luck in getting them to work seamlessly like MS Word.  
I'd like to help bring TiddlyWiki into its own as a NoSQL database and OneNote killer, but like everyone my time is limited (and skillset). 
So the best I can do for now is post ideas and see if anything sticks (or already exists). 

Mark S.

unread,
Jun 6, 2016, 11:47:58 AM6/6/16
to TiddlyWiki
TiddlyWiki isn't an interface on top of some database -- it's the database and interface all mixed together. So it doesn't really have a "back-end" that can be swapped out for some external source. Since it can also run on node.js, I imagine there might be some klugey way to make it exchange data with some other back-end.

But ... why? There must be a half-dozen server-based wiki's out there. TW is unique in that it is a single file that stands alone. It's good for accommodating the productivity styles of individuals, who each can set it up to match their particular thinking style. This sort of individuality is not often encouraged in the corporate world.

Mark

Josiah

unread,
Jun 8, 2016, 7:51:33 AM6/8/16
to TiddlyWiki
Ciao Mark S.

I agree. In my own use of it, and my own interest in it is, primarily, an AUTHOR of content who defines both the content and shaping. I really can't see the point in overdoing trying to make TW a front-end to something else. And its already its own database. I consider it partly a human scale response to an over corporate server determined world. And a unique one at that.

Though I do see interesting use cases like {{DesignWrITe}} with modest use of external spreadsheets.

The TWFederation thing Jed is pursuing is particularly interesting as a "TW philosophy compliant" way of interfacing with external data. A FETCH model makes some sense to me; a server dependency model does not.


Just thoughts
Josiah

RichardWilliamSmith

unread,
Jun 8, 2016, 8:26:59 AM6/8/16
to tiddl...@googlegroups.com
This is not really correct. Although TW appears to be "all mixed together" on the surface, there is actually a very strict separation of concerns in the architecture. Updating of the wiki-store is done (as far as I understand it) by the syncer, employing a suitable sync-adapter. In standalone TW, the wiki-store is a dedicated DIV in the HTML but the node.js version uses a different sync adaptor to update individual files on the filesystem. 

It should be possible to write a sync-adaptor to store your tiddlers anywhere - there is a link on tw.com to an indexedDB adapter implementation http://tiddlywiki.com/#IndexedDB%20Plugin%20by%20Andreas%20Abeck and I know that, last year, Danielo Rodriguez was working on a CouchDB/PouchDB adapter. https://groups.google.com/forum/#!searchin/Tiddlywiki/couchdb%7Csort:date

Personally I think it would be really interesting to see how an adapter for IPFS might work. Content published onto IPFS is addressed by it's hash. If we published individual tiddlers onto it and then the 'container' TW code to assemble them, you'd have an atomised document, distributed across the internet and when someone opens it, all the content would get pulled in from whichever copy is fastest (it's like a cross between bit-torrent, git and the web).

I have never seen any work/discussion about using TW as a data-source, but I bet if anyone knows, it would be Eric because I think a lot of his work with TW2 was data-driven.

Regards,
Richard
Reply all
Reply to author
Forward
0 new messages