Exporting Tiddlers as DATA URI's: Demo of Prototype

3 Likes

Looks snazzy @Charlie_Veniot thanks for sharing;

Some ideas

  • Can we share data uris in discourse?
  • I understand the value having your refined HTML format but we could add other formats;
    • Full html
    • Raw tiddler wikitext

In a similar way to you I made a snapshot.json (6.2 KB) tool to save an extra copy of a tiddler in HTML in the same wiki and display the snapshot, not the dynamic tiddler (that gets rendered to html).

  • This allows a complex tiddler generating a long list for example to be referenced with less performance requirements and you can delete or refresh the snapshot
  • You could consider also saving the data URI you generate back to your own snapshot or even a field in the original tiddler.

Perhaps tomorrow I could help add more functionality to your data url if you need it.

I do not yet have the details but I have some notes somewhere about the value of using data URI’s, there may be some nice tricks with them, especially for storing and sharing content.

Great work

Does it work in discourse? Me not liking discourse, I had not thought of trying it. I’ll do a test later.

The HTML I’m grabbing for the data uri’s, I’m using the “reducer” from my earlier post. I decided to go “small HTML” first, because not all web browser’s can handle very long data uri’s, and the amount of CSS that gets included without reducing is a little bit obscene.

Reduced HTML will be the default. An option to go big HTML, that is just a check box away.

Any kind of content format can be applied for any kind of export, including data uri’s. Just need to apply the right kind of regular expressions.

Saving the data uri to any field is easy. Just a copy operation. The data uri is already in a field (the temporary tiddler popping up as a modal.)

Putting together and improving this data uri is easy and in lock-step with that reducer thingy. Both are reducing at the moment, but both are also going to be “expanders” and “transformers” too.

Right now, my biggest hurdle: data uri is cool, nice to have as an option, but I can’t think of any exciting use cases. That is my most interesting attention-grabbing problem at the moment.

All of that aside, big-picture-wise, since being introduced to Feather Wiki, I’m thinking a lot about content import and export, content into TiddlyWiki from wherever, content from TiddlyWiki to wherever.

Now, time to get back to the bread and butter grind.

1 Like