Journal 2025-03-05
So I've got the #:transmissions applications src/applications/md-to-sparqlstore and src/applications/sparqlstore-to-html approaching what I need. There's still a bit of hackiness in the JS, but I don't need to worry about that right now.
These are for publishing documentation. But the docs I've got are very fragmented, my plan is to use #:semem (Semantic Memory) with a little bit of added AI to help organise them. I need to circle back to that very soon.
But first, the nuts & bolts of these applications.
The command :
./trans -v md-to-sparqlstore ~/sites/strandz.it/postcraft
should be picking up strandz.it/postcraft/manifest.ttl and using that for it's instance config. I can see right way that's not working correctly, DirWalker is walking /home/danny/hyperdata/transmissions/src/applications/md-to-sparqlstore/data/input rather than what's in the manifest:
:sourceDir "/home/danny/sites/danny.ayers.name/postcraft/content-raw" .
Hmm. I've got the --verbose/-v command-line arg to show the logger.debug statements, but that got a bit overwhelming, so moved most, including those in DirWalker to logger.trace. If I flip that in the JS...
Ew. No, that's give me the system trace info as well. For now I'll do a s/trace/debug instead.
DirWalker sourceDir from config = undefined
DirWalker, message.targetPath = /home/danny/sites/strandz.it/postcraft
DirWalker, message.rootDir = /home/danny/hyperdata/transmissions/src/applications/md-to-sparqlstore
DirWalker, message.sourceDir = undefined
DirWalker resolved dirPath = /home/danny/hyperdata/transmissions/src/applications/md-to-sparqlstore/data
DirWalker.walkDirectory, dir = /home/danny/hyperdata/transmissions/src/applications/md-to-sparqlstore/data
DirWalker.walkDirectory, dir = /home/danny/hyperdata/transmissions/src/applications/md-to-sparqlstore/data/input
DirWalker emitting :
Bum. The priority for settings should go like :
- inter-process message
manifest.ttlin the target given as a command-line argconfig.ttlapplication default-ish values associated with the transmission (pointed to bytransmissions.ttl)- whatever fallbacks I slapped in the code
Ok, I'd check if this, in transmissions.ttl...config.ttl` will be picked up first :
:p10 a :DirWalker ;
:settings :dirWalker .
...
:dirWalker a :ConfigSet ;
:sourceDir "/home/danny/sites/strandz.it/postcraft/content-raw" .
Good-o, that's fine. The log includes :
- DirWalker emit 13 : /home/danny/sites/strandz.it/postcraft/content-raw/knowledge/references/about.md
So the problem lies in my precedence code in src/model/Processor.js, that contains the superclass of the processors defined in src/processors/fs/DirWalker.js etc. Which is very annoying, I shouldn't have to touch the core code at this point in time.
Dogwalk time.
PS. A day later, I found the problem. The JS code was actually working correctly, What I was missing was a reference in the transmission the settings node, :dirWalker here:
:p10 a :DirWalker ;
:settings :dirWalker .