Hi,

In a previous mail I told how our last semester explorations in the
local community  building, deploying and teaching Brea[1][2], a Pharo
powered tool between a Static Site Generator and a headless CMS, led me
towards TiddlyWiki[3] as the more dynamic counterpart of such
deployments and today we a a little chat[4] with Norbert about trying to
avoid the over complication of NodeJS and replacing that with a pretty
simple Pharo based counterpart.

[1] https://mutabit.com/repos.fossil/indieweb/
[2] https://code.tupale.co/Offray/Brea
[3] https://tiddlywiki.com/
[4] https://twitter.com/NorbertHartl/status/1353319130804465668

I would like to start with something like tw5-server.rb [5], which is a
pretty small Ruby script (46 lines) based in the Webrick and fileutils
libraries, using the Pharo counterparts (Zinc? Teapot?). I don't have
experience in Ruby, but maybe something in the list can help. It seems
that the script opens a folder in the local file system and serves the
files there. One of them is a TiddlyWiki file and once it is served (at
port 8000) the class DefaultFileHandler (lines 18 to 35) takes care of
saving the file and sucesive copies of it. Particularly lines 25 and 26
create a backup of the body in the current file and updates the Tiddly
file body with new versions as saving is done in the web user interface.
But further details scape me, particularly how the server knows that the
TiddlyWiki file is being save.

[5] https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da

Any corrections on my understanding so far, hints or pointers on how to
get something similar with Pharo would be greatly appreciated.

Cheers,

Offray

Reply via email to