(pl)(calendar) improve miastamaszerujące output

This commit is contained in:
Andrea Vos 2023-07-02 14:15:28 +02:00
parent 64ff43f2a3
commit 1c2f9ef5c2

View File

@ -52,7 +52,11 @@ const fetchEvents = async () => {
maxwidth: '100%',
})
}
if (previous.length > events.length) { return; }
if (previous.length > events.length) {
console.error('stopping execution, number of events decreased')
return;
}
console.log(`Saving to ${path}`);
fs.writeFileSync(path, JSON.stringify(events, null, 4));
createEvents(
@ -71,6 +75,7 @@ const fetchEvents = async () => {
return;
}
console.log(`Saving to ${dir}/miastamaszerujace.ics`);
fs.writeFileSync(`${dir}/miastamaszerujace.ics`, value);
}
);