okami.mom/glamour
git clone https://git.nkp.pet/okami.mom/glamour
1fcce6f
main
1#!/bin/bash 2 3if !command -v freeze &> /dev/null;then 4echo "freeze not found. Please install freeze to capture images." 5echo "https://github.com/charmbracelet/freeze/" 6exit 1 7fi 8 9defaultStyles =("ascii" "auto" "dark" "dracula" "light" "notty" "pink" ) 10 11for style in " ${ defaultStyles [@]} " ;do 12echo "Generating screenshot for ${ style } " 13# take screenshot 14if [[$ style == *"light" * ]];then 15# Provide a light background to images 16freeze -x "go run ./examples/artichokes ${ style } " -b "#FAFAFA" -o "./styles/gallery/ ${ style } .png" 17else 18freeze -x "go run ./examples/artichokes ${ style } " -o "./styles/gallery/ ${ style } .png" 19fi 20 21# optimize filesize 22pngcrush -ow "./styles/gallery/ $ style .png" 23done