mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-29 05:46:54 +01: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
|