mirror of
https://gitea.com/Sirherobrine23/tea.git
synced 2024-08-21 10:57:25 +00:00
20 lines
553 B
Bash
20 lines
553 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
for element in ./styles/examples/*.md; do
|
||
|
echo "Generating screenshot for element ${element}"
|
||
|
basename="`basename -s .md ${element}`"
|
||
|
stylename="${basename}.style"
|
||
|
filename="${basename}.png"
|
||
|
|
||
|
# take screenshot
|
||
|
./termshot -o ./styles/examples/ -f "$filename" glow -s ./styles/examples/${stylename} ${element}
|
||
|
|
||
|
# add border
|
||
|
convert -bordercolor black -border 16x16 "./styles/examples/$filename" "./styles/examples/$filename"
|
||
|
|
||
|
# optimize filesize
|
||
|
pngcrush -ow "./styles/examples/$filename"
|
||
|
done
|