diff --git a/.gitignore b/.gitignore index 5eba6c3..4d77b65 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pdf *.log +images/ diff --git a/assets/banner.png b/assets/banner.png index d77e278..0e3b603 100644 Binary files a/assets/banner.png and b/assets/banner.png differ diff --git a/baker/banner.typ b/baker/banner.typ new file mode 100644 index 0000000..f2729a3 --- /dev/null +++ b/baker/banner.typ @@ -0,0 +1,59 @@ +#import "@preview/shadowed:0.1.2": shadowed + +#let LE = 10cm +#let shadow = 0.25cm + +#set page(margin: 0pt, width: 2 * LE, height: LE, fill: rgb(0, 0, 0, 0)) + +#place( + dx: 3cm, + dy: 1.1cm, + rotate( + -9deg, + shadowed( + radius: 0pt, + inset: 0pt, + blur: shadow, + image("./images/21.svg", height: LE * 0.6)))) + +#place( + dx: 1cm, + dy: 3.25cm, + rotate( + -20deg, + shadowed( + radius: 0pt, + inset: 0pt, + blur: shadow, + image("./images/51.svg", height: LE * 0.55)))) + +#place( + dx: 14cm, + dy: 1.5cm, + rotate( + 6deg, + shadowed( + radius: 0pt, + inset: 0pt, + blur: shadow, + image("./images/41.svg", height: LE * 0.65)))) + +#place( + dx: 11cm, + dy: 2cm, + rotate( + 25deg, + shadowed( + radius: 0pt, + inset: 0pt, + blur: shadow, + image("./images/31.svg", height: LE * 0.6)))) + +#place( + dx: 7cm, + dy: 0.75cm, + shadowed( + radius: 0pt, + inset: 0pt, + blur: shadow, + image("./images/11.svg", height: LE * 0.75))) diff --git a/baker/run-bake-banner.sh b/baker/run-bake-banner.sh new file mode 100755 index 0000000..ab5f383 --- /dev/null +++ b/baker/run-bake-banner.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +mkdir images + +# extract images from document created by action +mutool convert -o images/1.svg "$1" 1 +mutool convert -o images/2.svg "$1" 2 +mutool convert -o images/3.svg "$1" 5 +mutool convert -o images/4.svg "$1" 15 +mutool convert -o images/5.svg "$1" 16 + +typst compile banner.typ --ppi 220 ../assets/banner.png diff --git a/baker/shell.nix b/baker/shell.nix new file mode 100644 index 0000000..b334270 --- /dev/null +++ b/baker/shell.nix @@ -0,0 +1,14 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShellNoCC { + packages = with pkgs; [ + python312 + python312Packages.pyyaml + typst + typstyle + mupdf-headless + ]; +} diff --git a/run-bake-assets.sh b/run-bake-assets.sh new file mode 100755 index 0000000..1157760 --- /dev/null +++ b/run-bake-assets.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd baker + +echo "==> generate banner image" +nix-shell --run "./run-bake-banner.sh ../example.pdf"