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
This commit is contained in:
1 parent
2bb18a9e96
commit
9c99f4f969
1 file changed
+14
-12
@@ -1,5 +1,15 @@
|
||||
#!/usr/bin/env node
|
||||
/** @file program script: does a cache hold everything in a diigo RSS export? See {@link main}. */
|
||||
/**
|
||||
* @file program script: does a cache hold everything in a diigo RSS export?
|
||||
*
|
||||
* node scripts/compare-export.ts <cache.sqlite> <export.xml> <out-dir>
|
||||
*
|
||||
* Generates RSS from the cache's items (src/rss.ts) and compares it with
|
||||
* the export, keyed on link: title, tags, description, highlights and
|
||||
* sticky notes. Prints counts to stdout; writes <out-dir>/from-cache.rss
|
||||
* and <out-dir>/report.json (mismatched links, by category). Exits 2 on
|
||||
* bad usage.
|
||||
*/
|
||||
import * as nodeFs from "node:fs/promises";
|
||||
import { basename, join } from "node:path";
|
||||
import { DatabaseSync } from "node:sqlite";
|
||||
@@ -100,19 +110,11 @@ export function outDir(fs: Pick<typeof nodeFs, "writeFile">, dir: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates RSS from a cache's items (src/rss.ts) and compares it with a
|
||||
* diigo RSS export: title, tags, description, highlights + sticky notes.
|
||||
*
|
||||
* node scripts/compare-export.ts <cache.sqlite> <export.xml> <out-dir>
|
||||
*
|
||||
* Prints counts to stdout; writes <out-dir>/from-cache.rss and
|
||||
* <out-dir>/report.json (mismatched links, by category).
|
||||
*
|
||||
* The program's edge (ocap discipline, transitional form): it takes the
|
||||
* the program's edge (ocap discipline, transitional form): takes the
|
||||
* standard authorities as default arguments and attenuates them here —
|
||||
* the database to {@link cacheItems}, the output directory to
|
||||
* {@link outDir} — before anything else uses them. Ends by reporting an
|
||||
* exit code (2: usage) through `exit`.
|
||||
* {@link outDir} — before anything else uses them; reports the exit code
|
||||
* through `exit`
|
||||
*/
|
||||
export async function main(
|
||||
argv = process.argv.slice(2),
|
||||
|
||||
Reference in new issue
Block a user