/* * Preserve Specs for Tile and Blockchain formats * * Tile Spec:
- Structure
###### #Digested-Tile #ds/{deformat-digest}/{YYYY-MM-DD}\nAuthors:: {authors}\nLicense:: {license}\nDoc Seal:: {doc-seal-hash}\n###### #MarkdownTile\n{tile}\n###### #DeformattedTile\n{deformatted-tile}\n###### #EOT\n---\n - Location:
Notes/ds/tiles/{deformat-digest}.md - Upsert Logic: Skip (with Notice message) if
#ds/{deformat-digest}/{YYYY-MM-DD}exists, append otherwise Blockchain Spec: - Structure:
### [[${fileName}]] 🔒 #ds/seal/${docSealHash} chained ${YYYY-MM-DDTHH:mm} to #ds/block/${previousBlockchainEntryDigest}\n${digestTags.join(' ')}\n#ds/block/{currentBlockchainEntryDigest} - Location:
Notes/ds/blockchains/bc-{YY-MM}.md - Blockchain Logic: {previousBlockchainEntryDigest} is a hash of {YY-MM} for initial block or the BlockchainEntryDigest of the previous entry; if there are no “bc-…md” files yet, use the hash of the YY-MM, if there are not blocks in this months file yet, use the last block from the previous month, otherwise, use the last block in the current month’s file Script Spec:
- use Obsidian Templater scripting language for the script
- use app.fileManager.processFrontMatter to update frontmatter
- 15s Notice messages about updates, 3 messages: status, tiles, and blockchain
- tp.user scripts: computeSHA256(content, length = 12); splitIntoTiles(content); ensureDirectoryExists(path); upsertToFile(filePath, header, content); updateFrontMatter(file, updates); getPreviousBlockchainEntryDigest(app, computeSHA256);
- inline helper functions: createDigestTag(hash, date); createDocSealHash(digestTags);
*/