🐛 ⚡ fixes gitCommit + desc
All checks were successful
Update menicka / update-rss (push) Successful in 5m20s
All checks were successful
Update menicka / update-rss (push) Successful in 5m20s
This commit is contained in:
parent
65628c1f0d
commit
b685634b54
@ -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
15
cli.mjs
@ -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
4
package-lock.json
generated
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user