Help: Broke my saving mechanisms

I have converted my TiddlyWiki back and forth between a Node.js folder and a static HTML file single file wiki a few times, and probably did something wrong.

  • I now have a static HTML file that should use Timimi for saving. This worked before, but now this TiddlyWiki seems to be readonly, having removed the add and edit buttons and menu items.
  • I now have a Node.js instance that saves by downloading as an HTML file, instead of using the Node.js backend.

I’ve “converted” the Node.js folder to a HTML file with this command (maybe used something else before):

tiddlywiki node --output . --render '$:/core/save/all' index.html 'text/plain'

I think that I installed the “TiddlyWeb” and “Filesystem” plugins both inside the TiddlyWiki and in the tiddlywiki.info file. When I removed them from the TiddlyWiki’s control panel, the Node.js saving stopped working altogether.

My static HTML file single file wiki has the “Status of synchronization with server” toolbar icon/button instead of the plain old save icon/button.

What should I do?

It’s hard to say, what exactly happened. …

If I would be cruel, I’d say. Use the backup. … Did you use your “production” wiki to do experiments?

You can start with a new server. eg: in the temp directory

cd temp
tiddlywiki aNewWiki --init server
tiddlywiki aNewWiki --listen 

Now open the file explorer app of your system and drag & drop the wiki, that you created with your --render command and import it into the new page at localhost:8080

Then have a look at the tiddlers that can be imported. … Only import your content in the first run.

So you should get back your node.js based version. …

I’m not sure, what you understand as “static HTML file”. … TW supports a way to create static HTML files. But they are HTML and CSS only. They don’t contain any JS code and can’t save.

The file that can be saved to disk using Timimi is called “single file version” or single file wiki. It contains all the tiddlers and the core code.

So in your OP I think you meant the single file wiki as you wrote “static” … right?

I thought I was using best practise to convert between two supported formats.

Yes, I mean “static” as in “an HTML file”, as opposed to “HTML content generated dynamically by a server”.

Maybe the above command generates a “static” TiddlyWiki (as in no Javascript)? That was not my intention. I wanted a “single file wiki”.

(I got my Node.js TiddlyWiki working by restarting and making sure that the TiddlyWeb and Filesystem plugins are installed.)

This is the wrong use of the words static html, static html is without javascript and is not interactive. When you save a single file tiddlywiki it is a html file containing javascript, it is interactive and not static.

However you save a single file tiddlywiki, from a server (HTML content generated dynamically by a server unless it exports files without javascript), another single file wiki (save or download) , or even using tiddlywiki to generate new custom wikis from a template it is not static, ever. Eg using the download empty button on tiddlywiki.com generates a new single file wiki.

The only static html exports are either separate html files for each tiddler, or a single list of all tiddlers in html, static does not contain Javascript and other than links is not interactive.

A special case: On node you san simultaneously have the server present both interactive and static tiddlers to the visitor, via a template on its ip/port address.

I hope this helps, the correct terminology is important.

This command creates a single file wiki. But it contains all plugins. So it also contains the tiddlyweb related plugins. Which may cause problems in a single file wiki.

tiddlywiki node --output . --render '$:/core/save/all' index.html 'text/plain'

I did create a video series lately, that describes everything you need to know about plugins with step by step examples.

Have a closer look at: 08 Build an Index wiki with the CLI - YouTube It will show you the command that’s needed.

And it will talk about the template that is needed. …

Here’s the intro about the playlist: New HowTo Playlist: Use Plugins with TiddlyWiki and Build Single-File Wikis using the CLI

That’s right. They are needed for the Node.js configuration. But they should not be part of a single file wiki. As I wrote. Have a look at the video from the last post

Sorry, I couldn’t resist… :slight_smile:

In the web development world, static files are delivered by web servers exactly as they are stored on the disk or memory of the server, without any server-side manipulation.

Let me quote some random Microsoft documentation that I found:

Static content is a web page (HTML) that is delivered to the user exactly as stored. By contrast, dynamic content is generated by a web application, such as an ASP.NET, classic ASP, or PHP application. Static content displays the same information for all users; dynamic content can display user-specific information, such as the user name.

In the TiddlyWiki bubble, static means “HTML representations of a TiddlyWiki that doesn’t need JavaScript”.

In the conventional web development definition, HTML files are always static, no matter if they contain Javascript or iframes with Youtube players.

Since TiddlyWiki is a web technology thing, I think it’s unfortunate to use the word “static” for this. Maybe “plain HTML” or “HTML only” or “readonly HTML” or just “HTML without Javascript” would have been a better fit?

It is what it is.

We could always look at the “human toilet” option …

I do not intend to be controversial or contradictory, but after more than a decade using tiddlywiki, I think I have a grasp of it. So I clarify for you or future readers. You are not wrong in what you say, but perhaps insufficiently nuanced.

This is the point, we only use static for exported static HTML not TiddlyWiki. The whole world defines static, we just use the word, we define “single file tiddlywiki”, or “node JS tiddlywiki”, they are not static files.

Our / my use of the the terms static html is exactly correct according to your above definitions. The difference is tiddlywiki (single file html) contains its own code. It drives the universal client, the browser, in the environment of the browsers tiddlywiki is its own server. A single file tiddlywiki is not static html. A single file wiki lifts itself up by its bootstraps into the the browsers “operating environment” it talks to us through its User interface, and we to it, and back to the file system or server that hosts our html file (or tiddler files with node). For example tiddlyhost.com serves single file wikis, and it allows us to save them if they change.

When you use node as a tiddlywiki server there is part of tiddlywiki that loads into node and allows it to deliver tiddlers to the internet net address. But however tiddlers get into your browser once they are there they behave just like you had loaded a single file wiki, but saving tiddlers are divided into file files saved through the server.

I believe the key use of node is to introduce other server features and also break wikis up for version control in GitHub.

Perhaps then TiddlyWiki is unconventional, non-linear and a non-trivial quine. But it is, what it is. It breaks no rules, but it builds new ones.

In conventional web development the pages, what ever they contain, do not save changes to themself, they ask the server to do so, or more to the point the server decides. Single file wikis can be serverless, they ask the browser or host computer to save them and inner tiddlywiki manages this.

By the way TiddlyWiki can be used to generate the conventional HTML pages with or without Javascript of you want. It could be your own “Square space”.

Thank you, “Save snapshot for offline use” seems to be what I was looking for!

1 Like

Coke Zero was recently rebranded, since Coca-Cola worried (knew?) that people had forgotten what “Zero” means. It’s now called Coke Zero Sugar, to emphasize that it’s not Zero Calories or Zero Unicorns. Zero Sugar.