mirror of
https://git.pumpin.online/funkpower/typikon.git
synced 2026-10-23 03:07:12 +00:00
13 lines
471 B
JavaScript
13 lines
471 B
JavaScript
// Node, by import.
|
|||
|
|
import { readFileSync, writeFileSync } from "node:fs";
|
||
|
|
import { describeIso } from "typikon";
|
||
|
|
import { shape } from "./shape.mjs";
|
||
|
|
|
||
|
|
const [probesPath, outPath] = process.argv.slice(2);
|
||
|
|
const out = {};
|
||
|
|
for (const [date, jurisdiction, typikon] of JSON.parse(readFileSync(probesPath, "utf8"))) {
|
||
|
|
out[`${date}|${jurisdiction}|${typikon ? 1 : 0}`] =
|
||
|
|
shape(describeIso(date, { jurisdiction, typikon }));
|
||
|
|
}
|
||
|
|
writeFileSync(outPath, JSON.stringify(out));
|