🐛 fixes anchors for days

This commit is contained in:
Jan Andrle 2024-07-17 16:51:51 +02:00
parent 33d83aaa4f
commit 65628c1f0d
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
4 changed files with 10 additions and 18 deletions

View File

@ -1,7 +1,7 @@
# menicka-cron
<!-- generated -->
[pondělí](#pondeli) · [úterý](#utery) · [středa](#streda) · [čtvrtek](#ctvrtek) · [pátek](#patek) · [sobota](#sobota) · [neděle](#nedele)
[pondělí](#pondělí) · [úterý](#úterý) · [středa](#středa) · [čtvrtek](#čtvrtek) · [pátek](#pátek) · [sobota](#sobota) · [neděle](#neděle)
## pondělí
- [🏭 Jídelna Čakovice](https://www.menicka.cz/api/iframe/?id=8542&continuous=true): —

16
cli.mjs
View File

@ -12,20 +12,12 @@ $.api()
const menicka= await Promise.allSettled([ menickoCukrovarka(), menickoGlobus(), menickoMamafoodbistro() ])
.then(results=> results.filter(p=> p.status!=="rejected").map(p=> p.value));
const days= {
pondeli: "pondělí",
utery: "úterý",
streda: "středa",
ctvrtek: "čtvrtek",
patek: "pátek",
sobota: "sobota",
nedele: "neděle"
};
let out= Object.entries(days)
.map(([ k, v ])=> `[${v}](#${k})`)
const days= [ "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota", "neděle" ];
let out= days
.map((v)=> `[${v}](#${v})`)
.join(" · ");
for(const day of Object.values(days)){
for(const day of days){
out+= `\n\n## ${day}\n`;
out+= menicka.map(dayToMd(day)).join("\n");
}

8
package-lock.json generated
View File

@ -1,21 +1,21 @@
{
"name": "menicka-cron",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "menicka-cron",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",
"dependencies": {
"jsdom": "^24.1.0"
"jsdom": "~24.1"
},
"bin": {
"menicka-cron": "cli.mjs"
},
"peerDependencies": {
"nodejsscript": "^1.0.1"
"nodejsscript": "~1.0"
}
},
"node_modules/@types/glob": {

View File

@ -1,6 +1,6 @@
{
"name": "menicka-cron",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"bin": "cli.mjs",
"scripts": {