1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-12-04 14:46:40 -05:00
tea/vendor/github.com/charmbracelet/glamour/examples.sh

20 lines
553 B
Bash
Raw Normal View History

#!/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