mirror of
https://github.com/mfocko/blog.git
synced 2024-11-10 00:09:07 +01:00
13 lines
609 B
Bash
13 lines
609 B
Bash
#!/bin/sh
|
|
|
|
FONT="'Cascadia Code PL', 'JetBrains Mono', 'Iosevka', 'Fira Code', 'Hack', monospace"
|
|
|
|
for pic in $(find ./static/files -name '*.dot' -print); do
|
|
SVG_NAME=".$(echo $pic | cut -d'.' -f2)"
|
|
|
|
# light mode
|
|
dot $pic -Tsvg -Gfontname="$FONT" -Nfontname="$FONT" -Efontname="$FONT" > ${SVG_NAME}_light.svg
|
|
|
|
# dark mode
|
|
dot $pic -Tsvg -Gfontname="$FONT" -Nfontname="$FONT" -Efontname="$FONT" -Gbgcolor="#1b1b1d" -Gcolor="white" -Gfontcolor="white" -Nfillcolor="none" -Ncolor="white" -Nfontcolor="white" -Efillcolor="none" -Ecolor="white" -Efontcolor="white" > ${SVG_NAME}_dark.svg
|
|
done;
|