- Dec 2022
-
blog.dornea.nu blog.dornea.nu
-
For this part, probably we would combine the techniques shared in the notes of the previous entry with Brea, our Pharo powered tool between a static site generator and decoupled CMS.
-
-
blog.dornea.nu blog.dornea.nu
-
Basically I wanted to merge every tiddler into one ORG file.
All this detailed manipulation re/decomposing tiddlers in other formats or adding tiddlers content in a programmatic way is done via TiddlyWikiPharo and inside a single language. For external functionality not implemented or too slow in Pharo (for example YAML to JSON conversion) we try to program it in Nim and create a Pharo wrapper around the Nim binary output.
-
Generate HTML and meta files
For this, we use Pandoc's YAML metadata blocks or approaches inspired by it. Our data publishing package MiniDocs (which is a prerequisite of TiddlyWikiPharo), provides a YAML metadata importer/transformer to native Pharo dictionaries that can be added to tiddlers. An alternative route from tiddlers metadata to Markdown could be easily implemented (but, as told our focus has been Markdown to WikiText migrations so far)
-
Now let’s generate the single HTML file:
We do this in a semi-automatic way, as the manipulated tiddlers inside TiddlyWikiPharo powered data narratives are exported as a single JSON file that is dropped back into the single HTML file we they came from, before manipulation. Some automation could be implemented in the future, maybe with a simple Nim TW server (as we try to avoid JS incidental complexity as much as we can, including/particularly node).
-
David Alfonso has done a great job and put together a repository that helps you with the export of tiddlers. All you need is to export all your tiddlers bundled as one single HTML and then follow the instructions in the README.
TiddlyWikiPharo is capable of similar exportation and we start from the single HTML TW file that we can de/recompose almost at will, because we can manipulate the tiddlers inside a data narrative. As shown in the malleable systems wiki example, we're mostly focused in conversions from Markdown to WikiText (TW's format) as it is our most felt necessity, but migrations from WikiText to Markdown are in the radar, combining/extending TiddlyWikiPharo with Pandoc (future needs/funding will tell if/when is implemented).
-
- Jul 2020
-
github.com github.com