Commit Graph
7 Commits
Author SHA1 Message Date
dckc f3241e4985 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts does its file I/O asynchronously (node:fs/promises;
main is async), so no sync-I/O precedent. The one exception says why:
node:sqlite has only DatabaseSync.

Generated-by: Claude Opus 5.5
2026-10-07 08:44:22 -05:00
dckc dc4f23ad04 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: Object.fromEntries(Object.entries(…).map(…)) as
objectMap(original, mapFn), with @endo/common's signature.

Generated-by: Claude Opus 5.5
2026-10-07 08:41:30 -05:00
dckc 21505a5b8f fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts runs main only under import.meta.main (Node's
`if __name__ == "__main__"`), so importing it — say, from a test —
runs nothing.

Generated-by: Claude Opus 5.5
2026-10-07 08:40:00 -05:00
dckc dfd9a3d1ef fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts per the ocap style guide (dckc/awesome-ocap,
style-guide/): main takes standard authorities under standard names as
default arguments — argv, fs, connect, now, stdout, stderr, exit (the
transitional form of _script_io) — and attenuates them itself:
connect(dbPath) to a read-only cacheItems, the output directory to an
outDir that writes only plain file names inside it. Counts go to
stdout (program output), usage to stderr.

Generated-by: Claude Opus 5.5
2026-10-07 08:36:57 -05:00
dckc d145841a2e fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts under ocap discipline: parseExport and compare are
pure; main is the program's edge and takes every power it uses (argv,
file reads and writes, the sqlite read, the clock, console, the exit
code) as default arguments. Nothing ambient at module level; the last
line just calls main().

Generated-by: Claude Opus 5.5
2026-10-07 08:34:02 -05:00
dckc 0006c7c3a3 diigo-cache: lint typechecks the program scripts
scripts/tsconfig.json gives scripts/ node's types (@types/node, a new
devDependency) and allows the .ts import specifiers node's type
stripping needs; the worker's tsconfig still keeps node's types out.
pnpm lint runs it.

Generated-by: Claude Opus 5.5
2026-10-07 08:34:02 -05:00
dckc e6deb9fda0 diigo-cache: RSS in diigo's export shape, from cached items
src/rss.ts renders items as RSS 2.0 in the shape of diigo's RSS export:
title, link, and a description packing Tags:…;Description:…;
Annotations and Sticky notes:… (Highlight:/Sticky notes: lines). Unlike
the export it is well-formed (characters XML forbids are dropped; the
export carries some raw) and keeps whole titles (the export cuts at
255). Pure: dates come from the caller.

scripts/compare-export.ts (a program script: node, node:sqlite) loads a
cache's items, writes the RSS, and compares it with an export, keyed on
link, reporting counts by category.

Generated-by: Claude Opus 5.5
2026-10-07 05:22:12 -05:00