Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Vogel 2cc6ea93a8 cI: add baker script
Build'n check / run-ci-linux (push) Has been skipped Details
2024-11-27 00:46:10 +01:00
Sven Vogel d9c0967b9e fix: unexpected opening parenthesis 2024-11-27 00:35:43 +01:00
7 changed files with 93 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.pdf *.pdf
*.log *.log
images/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 638 KiB

59
baker/banner.typ Normal file
View File

@ -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)))

12
baker/run-bake-banner.sh Executable file
View File

@ -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

14
baker/shell.nix Normal file
View File

@ -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
];
}

6
run-bake-assets.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd baker
echo "==> generate banner image"
nix-shell --run "./run-bake-banner.sh ../example.pdf"

View File

@ -13,9 +13,7 @@
#import "glossary.typ": glossary #import "glossary.typ": glossary
#import "pages/titlepage.typ": new_title_page #import "pages/titlepage.typ": new_title_page
#import "pages/declaration-of-authorship.typ": new_declaration_of_authorship #import "pages/declaration-of-authorship.typ": new_declaration_of_authorship
#import "pages/confidentiality-statement.typ": ( #import "pages/confidentiality-statement.typ": new_confidentiality_statement_page
new_confidentiality_statement_page,
)
#import "pages/prerelease-note.typ": new_prerelease_note #import "pages/prerelease-note.typ": new_prerelease_note
#import "pages/outline.typ": new_outline #import "pages/outline.typ": new_outline
#import "pages/abstract.typ": new_abstract #import "pages/abstract.typ": new_abstract