Datasette for TiddlyWiki with an SQLite Database, by Simon Willison

After a Twitter discussion asking about TW + Python:

Simon Willison ended up created a backend server for TW:

This is written in Python with Simon’s Datasette framework, which is “An open source multi-tool for exploring and publishing data”.

It also saves tiddlers to an SQLite database. Right now, this is just for running locally, but it is a very interesting implementation.

7 Likes

Having SQLite storage for TW content is a possibility i am keen to explore… So i’ve installed Datasette app on my Mac, installed “datasette-tiddlywiki” via the built-in Plugins installer, and am trying to get it working.

Problem is: the app running in my browser at http://localhost:8001/-/tiddlywiki wants to access a tiddlywiki.db file… So i have created one from the “File: New empty database…” file, which does then enable loading a new TW instance in browser, but it appears with the two error messages below superimposed on top, preventing any interaction with the TW instance.

Can anyone give a clue as to what i might be doing wrong here?

syncer-browser-tiddlyweb - 26th December 2021 at 12:50pm

Error retrieving skinny tiddler list: [XMLHttpRequest](http://localhost:8001/-/tiddlywiki#XMLHttpRequest) error code: 500

syncer-browser-tiddlyweb - 26th December 2021 at 12:50pm (count: 3)

Sync error while processing save of '[$:/StoryList](http://localhost:8001/-/tiddlywiki#%24%3A%2FStoryList)': [XMLHttpRequest](http://localhost:8001/-/tiddlywiki#XMLHttpRequest) error code: 500

@simonw is the author but may be more likely to be monitoring GitHub issues for now.

Or taking a well deserved Christmas break!

1 Like

I haven’t tried it, but I’m wondering if you built the database the specified way:

datasette tiddlywiki.db --create

That method you cite, @Mark_S -what is indeed specified in the Github repo’s ReadMe- presumes installation of plugin from the commandline.

Since this plugin is now installable from within the application (what is NOT addressed in the ReadMe) via pulldown “Plugins” menu- good thing for me, since i was unable to install from commandline [1] -i thought i could also use the GUI feature to create new database.

Following @boris ’ advice to take the issue to Github, i see that developer @simonw and @jeremyruston are already talking about refinements to this process, so- tho i don’t understand enough to know if this particular problem is related directly or only tangentially- i have added this report to the discussion, and will be watching for any news there.

[1] Meanwhile: tho it’s a stretch for me, i wish i could somehow get this working via commandline, but i’ve been unable to run the given command- i guess (as maybe you can tell from this dialog excerpt from my terminal) because i’m not finding the right directory in which to run this command.

(base) MacBook-Pro:~ walterludwick$ cd ./Applications

(base) MacBook-Pro:Applications walterludwick$ datasette tiddlywiki.db --create

-bash: datasette: command not found

(base) MacBook-Pro:Applications walterludwick$ /Applications/Datasette.app

-bash: /Applications/Datasette.app: is a directory

(base) MacBook-Pro:Applications walterludwick$ cd ./Datasette.app

-bash: cd: ./Datasette.app: No such file or directory

Can you perhaps advise as to what i’m doing wrong/ how to put it right?

/walt