[calendar] move image generation to cron

This commit is contained in:
Avris 2021-09-18 16:55:57 +02:00
parent 5b1a6e5912
commit 1b12fbd857
12 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

View File

@ -34,11 +34,11 @@
<T>calendar.image.header</T>:
</p>
<p class="mb-0">
<a href="/img-local/calendar/overview.png" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
<a href="/calendar/overview.png" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
<Icon v="image"/>
<T>calendar.image.overview</T>
</a>
<a href="/img-local/calendar/labels.png" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
<a href="/calendar/labels.png" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
<Icon v="image"/>
<T>calendar.image.labels</T>
</a>

View File

@ -10,7 +10,7 @@ const shoot = async (url, filename) => {
});
pr.src(process.env.BASE_URL + url, ['1500x300']);
for (let buffer of await pr.run()) {
const dir = `${__dirname}/../static/img-local/calendar`;
const dir = `${__dirname}/../static/calendar`;
fs.mkdirSync(dir, {recursive: true})
const target = `${dir}/${filename}.png`;
console.log(target);