Journal 2025-03-08

#:todo Alongside rendering of HTML, I need a transmission to backup up store data. #:todo sort out rootDir vs targetPath

Today's mission is to get closer to pages rendering properly. One thing I need is a value in the SPARQL store for published (schema:datePublished...or use dcterms?)

Using:

./trans sparqlstore-to-html -v ~/sites/strandz.it/postcraft

around FileWriter, the message contains :

{
"appPath": "/home/danny/hyperdata/transmissions/src/applications/sparqlstore-to-html",
"subtask": "[no key]",
"rootDir": "/home/danny/hyperdata/transmissions/src/applications/sparqlstore-to-html",
"dataDir": "/home/danny/hyperdata/transmissions/src/applications/sparqlstore-to-html/data",
"targetPath": "/home/danny/sites/strandz.it/postcraft"
}

Ok, templates at eg.

/home/danny/sites/strandz.it/postcraft/layouts/base/templates/update-article.njk

I'll need to revisit this, it's a not a layout template but a SPARQL template. Later.

The template I need now will replace the object of a statement. From SPARQL 1.1 Update :

PREFIX foaf:  <http://xmlns.com/foaf/0.1/>

WITH <http://example/addresses>
DELETE { ?person foaf:givenName 'Bill' }
INSERT { ?person foaf:givenName 'William' }
WHERE
  { ?person foaf:givenName 'Bill'
  }

WITH is the graph, I'm using default (for now at least).

?article schema:datePublished ?published ;

PREFIX schema: <http://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://purl.org/stuff/transmissions/>

DELETE { <{{uri}}> schema:datePublished ?published }
INSERT { <{{uri}}> schema:datePublished "{{published}}" }
WHERE  { <{{uri}}> schema:datePublished ?published }

"mediaType": "text/markdown", "filepath": "/home/danny/sites/strandz.it/postcraft/content-raw/knowledge/references/about.md", "size": 0, "created": "2025-02-25T15:27:44.619Z", "modified": "2025-02-09T11:51:46.338Z",

Journal 2025-03-08