🐛 ⚡ 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
|
# menicka-cron
|
||||||
|
|
||||||
<!-- generated -->
|
<!-- 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í](#pondělí) · [úterý](#úterý) · [středa](#středa) · [čtvrtek](#čtvrtek) · [pátek](#pátek) · [sobota](#sobota) · [neděle](#neděle)
|
||||||
|
|
||||||
## pondělí
|
## pondělí
|
||||||
|
15
cli.mjs
15
cli.mjs
@ -13,24 +13,23 @@ $.api()
|
|||||||
const menicka= await Promise.allSettled([ menickoCukrovarka(), menickoGlobus(), menickoMamafoodbistro() ])
|
const menicka= await Promise.allSettled([ menickoCukrovarka(), menickoGlobus(), menickoMamafoodbistro() ])
|
||||||
.then(results=> results.filter(p=> p.status!=="rejected").map(p=> p.value));
|
.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" ];
|
const days= [ "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota", "neděle" ];
|
||||||
let out= days
|
let out= description+"\n\n";
|
||||||
.map((v)=> `[${v}](#${v})`)
|
out+= days.map((v)=> `[${v}](#${v})`).join(" · "); // anchors for days
|
||||||
.join(" · ");
|
for(const day of days){ // menicka
|
||||||
|
|
||||||
for(const day of days){
|
|
||||||
out+= `\n\n## ${day}\n`;
|
out+= `\n\n## ${day}\n`;
|
||||||
out+= menicka.map(dayToMd(day)).join("\n");
|
out+= menicka.map(dayToMd(day)).join("\n");
|
||||||
}
|
}
|
||||||
const gen= [ "<!-- generated -->", "<!-- /generated -->" ];
|
const gen= [ "<!-- generated -->", "<!-- /generated -->" ];
|
||||||
const readme= s.cat("README.md");
|
const target= "README.md";
|
||||||
|
const readme= s.cat(target);
|
||||||
out= [
|
out= [
|
||||||
readme.slice(0, readme.indexOf(gen[0])-1),
|
readme.slice(0, readme.indexOf(gen[0])-1),
|
||||||
gen[0], out.replace(/(\*)/g, "\\$1"), gen[1],
|
gen[0], out.replace(/(\*)/g, "\\$1"), gen[1],
|
||||||
readme.slice(readme.indexOf("\n", readme.indexOf(gen[1]))+1)
|
readme.slice(readme.indexOf("\n", readme.indexOf(gen[1]))+1)
|
||||||
].join("\n");
|
].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);
|
$.exit(0);
|
||||||
})
|
})
|
||||||
.parse();
|
.parse();
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "menicka-cron",
|
"name": "menicka-cron",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "menicka-cron",
|
"name": "menicka-cron",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsdom": "~24.1"
|
"jsdom": "~24.1"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "menicka-cron",
|
"name": "menicka-cron",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "",
|
"description": "Konsolidace obědových meníček pro vybírání obědů v práci.",
|
||||||
"bin": "cli.mjs",
|
"bin": "cli.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
Loading…
Reference in New Issue
Block a user