feat: add page preview baker
This commit is contained in:
parent
86e5944390
commit
4513d993b4
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
#let gap = 0.5cm
|
||||||
|
|
||||||
|
#set page(margin: 0pt, width: 210mm * 3 + 2 * gap, height: 297mm * 2 + gap, fill: rgb(0, 0, 0, 0))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 0mm,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/11.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 210mm + gap,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/21.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 2,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/31.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 210mm * 0,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/71.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 1,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/41.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 2,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/51.svg", height: 297mm))
|
|
@ -1,12 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "==> generate images"
|
||||||
mkdir images || true
|
mkdir images || true
|
||||||
|
|
||||||
# extract images from document created by action
|
# extract images from document created by action
|
||||||
mutool convert -o images/1.svg "$1" 1
|
mutool convert -o images/1.svg "$1" 1
|
||||||
mutool convert -o images/2.svg "$1" 2
|
mutool convert -o images/2.svg "$1" 2
|
||||||
|
mutool convert -o images/2.svg "$1" 2
|
||||||
mutool convert -o images/3.svg "$1" 5
|
mutool convert -o images/3.svg "$1" 5
|
||||||
|
mutool convert -o images/7.svg "$1" 7
|
||||||
mutool convert -o images/4.svg "$1" 15
|
mutool convert -o images/4.svg "$1" 15
|
||||||
mutool convert -o images/5.svg "$1" 16
|
mutool convert -o images/5.svg "$1" 16
|
||||||
|
|
||||||
|
echo "==> generate banner"
|
||||||
typst compile banner.typ --ppi 360 ../assets/banner.png
|
typst compile banner.typ --ppi 360 ../assets/banner.png
|
||||||
|
echo "==> generate preview"
|
||||||
|
typst compile preview.typ --ppi 360 ../assets/page-preview.png
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
cd baker
|
cd baker
|
||||||
|
|
||||||
echo "==> generate banner image"
|
echo "==> generate assets"
|
||||||
nix-shell --run "./run-bake-banner.sh ../example.pdf"
|
nix-shell --run "./run-bake-banner.sh ../example.pdf"
|
||||||
|
|
Loading…
Reference in New Issue