feat: refactor and build pngs with nix develop
This commit is contained in:
parent
06187f347b
commit
43c049576a
26 changed files with 435 additions and 101 deletions
18
Justfile
Normal file
18
Justfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
build:
|
||||
#!/bin/bash
|
||||
set -e
|
||||
if ! command -v inkscape &> /dev/null; then
|
||||
echo "inkscape not installed. aborting"
|
||||
exit 1
|
||||
fi
|
||||
widths=(64 128 256 512 1024)
|
||||
mkdir -p pngs
|
||||
for svg in src/logo*.svg; do
|
||||
for width in "${widths[@]}"; do
|
||||
filename=$(basename -- "$svg")
|
||||
filename="${filename%.*}"
|
||||
inkscape "$svg" --export-type=png --export-filename="pngs/$filename-w$width.png" --export-width="$width"
|
||||
done
|
||||
done
|
||||
inkscape "src/social-card.svg" --export-type=png --export-filename="pngs/social-card.png" --export-width="1920"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue