From: Sergey Matveev Date: Wed, 22 Feb 2023 09:28:13 +0000 (+0300) Subject: Ability to specify link to the stylesheet X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=0686fd9b275623babc009a7969a8d9173437acb1;p=galgen.git Ability to specify link to the stylesheet --- diff --git a/galgen.zsh b/galgen.zsh index f1c6253..55e24e8 100755 --- a/galgen.zsh +++ b/galgen.zsh @@ -5,6 +5,7 @@ set -e pagesize=${PAGESIZE:-100} ordering=${ORDERING:-Om} +style=$STYLE djxl2ppm() { djxl $1 $1.ppm @@ -13,6 +14,8 @@ djxl2ppm() { rm ${1}-ec1.pgm } +[[ -z $style ]] || style="" + setopt EXTENDED_GLOB imgs=((*.jxl|*.webp~*.preview.webp)($ordering)) for (( i=1 ; i <= ${#imgs} ; i++ )) { @@ -21,7 +24,7 @@ for (( i=1 ; i <= ${#imgs} ; i++ )) { local dst=$i.img.html cat > $dst < -Image ${i}/${#imgs}: $img +${style}Image ${i}/${#imgs}: $img EOF [[ $i -eq 1 ]] || echo "<<<" >> $dst @@ -86,7 +89,7 @@ for (( p=1 ; p <= $pages ; p++ )) { local dst=$p.page.html cat > $dst < -Page ${p}/$pages +${style}Page ${p}/$pages EOF [[ $p -eq 1 ]] && [[ -r .txt ]] && { echo "
" >> $dst