I have an experiment running that may or may not end up being a project. I am trying to build a wiki with my own data by working with individual files in either .tid or .tiddler format.
I’m processing text files, so I’m intrigued by the slicer wiki type that the tiddlywiki --init NodeJS command can generate, but I don’t understand how the utility works, especially since it appears to be simply a wiki with its own tiddlers. But that’s neither here nor there; I can find another way to slice up text files.
I have one TiddlyWiki served on my localhost using Tiddly Server (tiddlyserver --config mypath/mysettings.json). Then, I have a totally separate project in a separate directory and even a separate NodeJS ecosystem. (I’m using local NodeJS packaging; so I’m prefixing the commands with npx in my terminal environment.) In my second project directory I have the tiddlywiki NodeJS program installed and do not have tiddlyserver installed.
From the second directory, I’ve been trying to import the tiddlers from the wiki running on localhost through the tiddlyserver instance from the first directory. I’ve read the help documentation in the tiddlyserver command and have tried a pretty basic use of the –render option:
npx tiddlywiki --verbose --fetch files “http://127.0.0.1:8080/wiki.html” “[all[tiddlers]]” application/x-tiddler ./tiddlers/
The command works! The output says it imported 152 tiddlers. But it doesn’t do what I was expecting. I thought this would populate the ./tiddlers/ directory inside of the current folder (which was generated by tiddlywiki --init server) with *.tid files for all the tiddlers from the wiki file I have hosted in localhost through tiddlyserver.
Instead, it only produced one file, with this content:
created: 20240611153228728
modified: 20240620151246540
title: application/x-tiddler
Dropdown Template
I was trying a basic command from a careful reading of the help docs, but I don’t understand how to operate this functionality. I’d actually like to be able to select specific plugins and tiddlers to import, but there’s no way I’m going to understand how to do so. Getting the files to actually appear will be the first step.
The intermediate goal is to be able to develop a wiki by working with a set of plain text files, so that I can operate TiddlyWiki almost like a static site generator. I was confused about this difference between the tiddlywiki and tiddlyserver NodeJS programs for this purpose, and I basically started working through tutorials for both of them at the same time:
- The Getting Started Guide · TiddlyServer
- Setting Up a Personal TiddlyWiki Server on OS X | Undefined Value
The end goal is to process text files with metadata and import into a wiki, using a sparce pre-made wiki with 5 plugins as a model and/or starting point. I notice that even though tiddlyserver does not seem to allow me to work with individual tiddler files, it is an efficient way to work on a wiki, since it saves efficiently and doesn’t get frozen or slow like my browsers and TiddlyDesktop often do. So, I might skip to the end goal and just do a bunch of external text processing and then import into the wiki that I have hanging out on localhost.
But I’d like to be able to understand the Node utilities, particularly what production methods workflows the tiddlywiki program allows.