🐛 fixes gitCommit + desc
All checks were successful
Update menicka / update-rss (push) Successful in 5m20s

This commit is contained in:
Jan Andrle 2024-07-17 17:01:02 +02:00
parent 65628c1f0d
commit b685634b54
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
4 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,7 @@
# menicka-cron
<!-- generated -->
Konsolidace obědových meníček pro vybírání obědů v práci.
[pondělí](#pondělí) · [úterý](#úterý) · [středa](#středa) · [čtvrtek](#čtvrtek) · [pátek](#pátek) · [sobota](#sobota) · [neděle](#neděle)
## pondělí

15
cli.mjs
View File

@ -13,24 +13,23 @@ $.api()
const menicka= await Promise.allSettled([ menickoCukrovarka(), menickoGlobus(), menickoMamafoodbistro() ])
.then(results=> results.filter(p=> p.status!=="rejected").map(p=> p.value));
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 days){
let out= description+"\n\n";
out+= days.map((v)=> `[${v}](#${v})`).join(" · "); // anchors for days
for(const day of days){ // menicka
out+= `\n\n## ${day}\n`;
out+= menicka.map(dayToMd(day)).join("\n");
}
const gen= [ "<!-- generated -->", "<!-- /generated -->" ];
const readme= s.cat("README.md");
const target= "README.md";
const readme= s.cat(target);
out= [
readme.slice(0, readme.indexOf(gen[0])-1),
gen[0], out.replace(/(\*)/g, "\\$1"), gen[1],
readme.slice(readme.indexOf("\n", readme.indexOf(gen[1]))+1)
].join("\n");
s.echo(out).to("README.md");
s.echo(out).to(target);
if(is_git) gitCommit(changed, "pull");
if(is_git) gitCommit([ target ], "pull");
$.exit(0);
})
.parse();

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "menicka-cron",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "menicka-cron",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"dependencies": {
"jsdom": "~24.1"

View File

@ -1,7 +1,7 @@
{
"name": "menicka-cron",
"version": "1.0.1",
"description": "",
"version": "1.0.2",
"description": "Konsolidace obědových meníček pro vybírání obědů v práci.",
"bin": "cli.mjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"