Remove check
This commit is contained in:
parent
5c8e096c5d
commit
718d380a1f
20
src/check.ts
20
src/check.ts
|
@ -1,20 +0,0 @@
|
||||||
import * as xmlbuilder2 from "xmlbuilder2";
|
|
||||||
import fs from "fs";
|
|
||||||
|
|
||||||
console.log("STARTED");
|
|
||||||
for (const feed of fs
|
|
||||||
.readdirSync("static/feeds")
|
|
||||||
.filter((file) => !file.startsWith("."))) {
|
|
||||||
try {
|
|
||||||
const xml: any = xmlbuilder2.convert(
|
|
||||||
fs.readFileSync(`static/feeds/${feed}`, "utf8"),
|
|
||||||
{ format: "object" }
|
|
||||||
);
|
|
||||||
if (xml?.feed?.updated === undefined)
|
|
||||||
throw new Error("Can’t find xml.feed.updated");
|
|
||||||
console.log(`OK ${feed}`);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`ERROR ${feed}: ${error}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log("FINISHED");
|
|
Loading…
Reference in New Issue