Tiddlywiki with Solid Pod storage

I made a tiddliwiki with uses a Solid Pod as storage for the tiddlers (notes and documents).
It can be tested here SolidTiddlyWiki.

It takes about 1 minute to initialise the syncing but works nicely after that.

As you will see it uses a solid-file-widget that is a reusable component.
Not on github for the time being, just a question of days

9 Likes

Nice! What’s the reason for the long initialization time?

If we could accomplish to add a JSON-LD context to the tiddler json files it would be even linked data.

1 Like

I got an error

Fantastic! Good work! I’d love to get a peak at your solid-file-widget.

Don’t take the error in consideration just close it. It is part of the trying connections between tiddlywiki and the Solid Pod. I must try to return a no error in the callback to tiddlywiki and see what happens.
From my tests the long time taken to first sync seems on tiddlywiki side and may be related to the browserify and babel stuff or not ???

The RemoteStorage from which I take a very large inspiration as no lag time.

Actually on top of the tiddlers there is an index file and each tiddlers contains all elements from the index
I don’t know what should be the JSON-LD context of the tiddler document (text, image, audio, video, js code).

does it as to be in each file or a kind of turtle index file.
what to to describe the tags which make the tiddlers in relations.

As I said I’m inclined to think that the long time to initialize relates to the browserfy/babelify phase.
I don’t know anything about that and if I can avoid babelify with the solid-file-client.

Here is a new version of the SolidTiddllywiki,
checked on NSS 4.4.1, which solves 2 main problems :

  • the 60 seconds delay has finally vanished
  • the automation of the creation of the default ‘tiddlers’ folder and subfolder ‘wiki’

The needed folder /public/tiddlers is created and you can have multiple tiddlywiki, default is
main : /public/tiddlers/main.

It was quite a job to learn enough javascript, the use of Promise and find a way to use them sequentially (you need to use return <yourPromise> in the .then chain) (in my case solid-file-client Promises. Thank Jeff for your work)
To use github and local git and finally to publish on npmjs solid-file-widget.

It uses an improved version of solid-file-widget

Both apps are on github :

I am sure the code is not very clean.
I will be happy for all returns

If anyone is using the prior version it is fully compatible (no changes to the stored files).

2 Likes

Hi, I’ve rise some issue on your repo, it’s currently unable to use now.

I am preparing a new version of solidTiddlywiki that use turtle files to store the tiddler.
I would like some comment on the choices I made for the vocabularies and ontologies to convert the tiddlywiki’s references to RDF.

this.ontology = {
	"dc":"http://purl.org/dc/elements/1.1/",
	"dcterms":"http://purl.org/dc/terms/",
	"schema":"https://schema.org/",
	"ex":"http://example.org/vocab#"  // "ex" is needed : used as default tiddlywiki ontology
}

this.prefix = "";
Object.entries(this.ontology).forEach(
 ([key, value]) => {this.prefix = this.prefix+"\n@prefix "+key+": <"+value+"> ."}
)

// subject
this.subject = "\n\n<this>" ;
	
// tidlerKeys to turtle predicate
this.tiddlerKeys = {
	"created":"schema:dateCreated",
	"creator":"schema:creator",
	"text":"schema:text",
	"title":"dc:title",
	"type":"dc:type",
	"tags":"schema:keywords",
	"modified":"schema:dateModified",
	"modifier":"schema:contributor",
	"_canonical_uri":"schema:url",
	"draft.of":"ex:draft_of",          // dot not allowed in RDF vocab
	"draft.title":"ex:draft_title"}    // dot not allowed in RDF vocab
2 Likes

Examples of the tiddlers in RDF turtle can be seen at
https://bourgeoa.solid.community/public/tiddlers/test2/

Do not consider the index files.
I do not use them anymore. May be used on demand for performance.
There is an migration process from the previous .json format (with a migrate backup folder) in case anyone is using the app.

This is a great idea, @bourgeoa … But i’m unable to save the index.html file to my Solid pod, though i have logged-in to it through your app (several times), changed the “Saving” option to “nodesolidserver syncadapter”, closed that tiddler and reloaded, as directed by that feature. Still: every time i push the save button, i just get another file saved to my desktop. NB: i am familiar with saving functions of TW5, i’m already managing several TW5 instances utilising different saving modes; just can’t get this one to work the way i believe it should (if i’m understanding this correctly). Any instruction you might give that would help me to get a TW5 instance saving to my Solid pod, i would sure appreciate!

Thank you for trying tiddlywiki with Solid pod storage.

  • index.html can be anywhere on any solid pod or any other web server
  • the tiddlers are saved on your pod as .ttl files with or without an index

I just tried it using https://bourgeoa.solid.community/public/tiddlywiki/index.html and it is still working.
You can try it.

I will be happy to give you more help

1 Like

Hey, Bourgeoa: thank-you kindly for the quick & supportive response! My POD at Inrupt is set up such that this service can create read all files there, create and update files… But yet i get this message when i try to log into my POD thru your service: “you choosed not to create public tiddler”… So maybe the problem is there?

ps: now i just clicked the link you just posted, came to blank tiddler and clicked the button over at top RH corner that said “Connect your Solid POD”… which threw the following error msg:

Internal JavaScript Error

Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser

Uncaught TypeError: this.showChooseOrSignIn is not a function

pps: Now i have another problem -this one from the Inrupt server itself (even after i cleared my browser of all cookies, as this error msg recommends:

This page isn’t working

inruptDOTnet redirected you too many times.

ERR_TOO_MANY_REDIRECTS

OK
I just tried to create a new tiddlywiki in new pod with the above link and got the same error.

I shall try to find out the problem and return to you may be not before next week.

1 Like

I updated my app on the server. (I forgive to do it)
You can try it using : https://bourgeoa.solid.community/public/tiddlywiki/

You must add https://bourgeoa.solid.community to your trusted app (see preferences).

The app needs some cleaning on console.log and I have left the index option at connexion (I don’t know if it improves performance).

Thanks for the update, @bourgeoa … But saving to my solid pod still fails with that same error msg:

This page isn’t working

inrupt.net redirected you too many times.

ERR_TOO_MANY_REDIRECTS

Doesn’t not help to clear cookies, per the given advice, refresh/ reboot browser, etc.
I have indeed got https://bourgeoa.solid.community in my list of trusted apps, with all permission assigned.
Dunno what else i can do, but would love to see this working!
If others can share link to a working instance, or else replication of error, maybe that would help (?)

Did you clear the inrupt.net cookie ?
Which browser are you using ?

This error is not related to my app

Thanks @bourgeoa I did clear the inrupt.net cookie (again)… And, again, though it appears that i am logged-in thru your app, ii got the error reported earlier in this thread, i.e. :

You choosed not to create /public/tiddlers

This brings me back to the. “Saving” control panel of this wiki interface you provide, where i am not clear what parameters i am supposed to set, to make this work. Given that i have nothing created on the side of my solid pod server, besides permissions (full) for your app’s access, my assumption has been i should leave most parameters as per the defautl (i.e. Root folder = public ; tiddlers = tiddlers ; wiki folder = main), but my doubt is about what i should put in that first field, i.e. Pod Name. Following your example, i have simply replaced the xyz (or bourgeoa in your case) with my own Inrupt ID, which is “refarmer” -i.e. Pod Name = https://refarmer.inrupt.net/profile/card#me… And when i do that, i get the error message quoted herein. If instead i put bourgeoa instead of refarmer, i get the error reported in my previous message in this thread.
So: i’m still stumped.

Suggestion: If you could perhaps give a step-by-step instruction (ideally in-context of wiki, instead of just here, so it’s clear for all who might wanna try this app), detailing all user inputs to the process that have to be executed in order, that would sure help!

ps: am running Chrome Version 83.0.4103.97 (Official Build) (64-bit), in case that helps.

  1. The pod name area is only used if you are accessing a Pod with an other webId
    (example :
    podName : https://bourgeoa.solid.community
    webId : https://farmer.inrupt.net…).
    In that case you must have allowed access for that webId to /public/tiddlers/main

  2. when connecting yourself to your pod you should :

  • click on Connect your Solid Pod

  • click on the green Connect

  • fill the log in popup to solid Pod as usual

  • the first time and if /public/tiddlers do not exist you will be asked to allow for creation
    you should accept. If you refuse you will receive the message
    You choosed not to create /public/tiddlers
    and tiddlywiki will not be connected to your Pod

  • After that and next times there will be 2 messages before accessing your tiddlers in /public/tiddlers/main
    the last message is :
    synced with Pod
    click on + to create a tiddler
    click on <more> then <tags> to find your tiddlers (including non tagged one's)

There was a help and I deleted it. I must redo one.
Please ask if you need more details.
Give me the outcome if you succeed.

ps. : clearing the cookies are not so easy I know you must go to /settings/site parameters/cookies/display cookies (something like that I’m using a french version)

1 Like

There was a help and I deleted it. I must redo one.

Thanks, @bourgeoa : that helped!

Give me the outcome if you succeed.

Partial (if not total) Success; By going to my Solid server at https://refarmer.inrupt.net, and inside the …/public directory (there by default) and creating 2 subdirectories ( /tiddlers/main/ ), i am now able to create a new tiddler thru your wiki interface and store it there. Yay! (first data i’ve actually stored on a Solid pod, thru your app :slight_smile:

One little bug tho: when i click checkmark to save the tiddler, it throws this error msg:

Internal JavaScript Error

Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser

Uncaught TypeError: Cannot read property ‘substring’ of undefined

First time, i followed that advice and refreshed my browser… But then (of course) it went back to the default view -i.e. having your defaut parameter for Server Name in the “Saving” config panel, and WITHOUT my tiddlers. But then, checking my Solid pod, the data was indeed saved there… And then i created two more tiddlers to test, ignoring that error msg each time, and indeed they were both saved to my Solid pod.

But now i’m wondering: how can i have an online wiki that persists across sessions? What i have now is a collection of individual tiddler files in my Solid pod, but that’s not quite an online TiddlyWiki, is it?