👮 refactored

This commit is contained in:
Jan Andrle 2024-06-26 15:52:59 +02:00
parent af43fa1422
commit 5700e740f8
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# pagenotfound-cli # pagenotfound-cli
Utility primary for generating RSS feed for Pagenotfound Utility primary for generating RSS feed for Pagenotfound
[RSS](https://gitea.jaandrle.cz/jaandrle/pagenotfound-cli/raw/branch/main/rss.xml)

View File

@ -1,8 +1,7 @@
#!/usr/bin/env -S npx nodejsscript #!/usr/bin/env -S npx nodejsscript
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */ /* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
import { JSDOM } from "jsdom";
const url_drops= "https://pagenotfound.cz/drop/"; const url_drops= "https://pagenotfound.cz/drop/";
const { name, version, description }= s.cat("package.json").xargs(JSON.parse); const { version, description }= s.cat("package.json").xargs(JSON.parse);
/** /**
* @typedef {Object} Article * @typedef {Object} Article
* @property {string} title * @property {string} title
@ -63,6 +62,7 @@ async function toRSS(json){
"</rss>" "</rss>"
].join("\n")).to(path); ].join("\n")).to(path);
} }
import { JSDOM } from "jsdom";
async function sitemap(){ async function sitemap(){
const path= "sitemap.json"; const path= "sitemap.json";