Commit Graph
14 Commits
Author SHA1 Message Date
dckc 7c0d1d62c6 fixup! diigo-cache: RSS in diigo's export shape, from cached items
Comments written for the reader: no restating what the shebang says, no traces of the design conversation; the publish comment no longer mentions a projection that no longer exists.

Generated-by: Claude Opus 5.5
2026-10-07 09:46:21 -05:00
dckc 697fd95514 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: the manual is a HELP string at the top of the module
(a docstring, as a value) and main prints it on bad usage. No reading
its own source, no regex, one copy; @file points at it.

Generated-by: Claude Opus 5.5
2026-10-07 09:44:26 -05:00
dckc 2055e8c1c9 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: the usage message comes from the @file manual's
synopsis line (read from the script's own source, on the bad-usage path
only), docopt-style, so the synopsis lives in one place; if the header
changes shape, it says "see the @file comment".

Generated-by: Claude Opus 5.5
2026-10-07 09:42:31 -05:00
dckc 8400078656 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: the manual drops "exits 2 on bad usage"; it's the
convention, and BAD_USAGE documents it.

Generated-by: Claude Opus 5.5
2026-10-07 09:40:47 -05:00
dckc a40d2e924a fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: the usage exit status is a named constant,
BAD_USAGE = 2, whose JSDoc cites the convention (Bash Reference Manual
§3.7.5); the manual just says "Exits 2 on bad usage".

Generated-by: Claude Opus 5.5
2026-10-07 09:40:10 -05:00
dckc 549ff5bf4b fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: exit 2 on bad usage is an external convention, so its
@file cites the source (Bash Reference Manual §3.7.5, Exit Status).

Generated-by: Claude Opus 5.5
2026-10-07 09:39:00 -05:00
dckc 9c99f4f969 fixup! diigo-cache: RSS in diigo's export shape, from cached items
compare-export.ts: as a program script, its @file is its manual
(purpose, usage, outputs, exit code), per docs-files-api's exception;
main's JSDoc keeps only the edge and attenuation.

Generated-by: Claude Opus 5.5
2026-10-07 09:37:31 -05:00
dckc 76b9ed1494 fixup! diigo-cache: RSS in diigo's export shape, from cached items
Docs per the docs-files-api skill: a 1–2 line @file; what a declaration is or does in JSDoc on it, not in // comments or the file header.

Generated-by: Claude Opus 5.5
2026-10-07 09:34:06 -05:00
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 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