File: thumbspage/examples/unicode/_generate.sh
#!/bin/bash
# ========================================================================
# Run this bash script in this folder to make just this folder's gallery:
#
# ~/.../thumbspage/examples/unicode$ bash _generate.sh
#
# To make all examples, run the script ../../build/generate-examples.py,
# which runs this script and all others like it. This automates console
# inputs, but requires a Unix-style bash shell; extrapolate for other
# shells or run thumbspage manually elsewhere per _HOW-MADE.txt here.
# Caveat: this requires editing the "unito" setting on each new release.
#
# [3.0] Removed the former " " number-columns second input lines - never
# asked for the now-default dynamic (responsive) index-layout mode. This
# is better avoided by setting input* config options in file or cmd args.
#
# ALSO drop images/FOOTER.html's conrsilk bg color for dark mode (now that
# it's supported by thumbspage index pages too).
# ========================================================================
# gallery in subfolder, plus a partial results folder, and an extra run
# alternative default-footer index
mv ./images/FOOTER.html ./images/_FOOTER.html
python3 ../../thumbspage.py ./images <<-EOF
EOF
mv ./images/index.html ./images/index-default.html
mv ./images/_FOOTER.html ./images/FOOTER.html
# real index
python3 ../../thumbspage.py ./images <<-EOF
EOF
# copy a small subset of the gallery for online views
unifrom=./images
unito=./results-3.0
# make dir if needed
if [ ! -d $unito ]; then { rm -f $unito; mkdir $unito; } fi
cp $unifrom/index.html $unito/_index.html
# this is auto-split on spaces into a list, use "" for '
files="'chicago'-&'\$#~,^_.JPG 真棒照片.JPG pymailgui-spÄÄÄm.png"
for name in $files; do cp $unifrom/$name $unito; done
rm -rf $unito/_thumbspage
mkdir $unito/_thumbspage
for name in $files
do
cp $unifrom/_thumbspage/$name $unito/_thumbspage
cp $unifrom/_thumbspage/$name.html $unito/_thumbspage
done
##------------------------------------------------------
## UNUSED dynamic-layout alternative ([3.0] now default)
##
## python3 ../../thumbspage.py ./images \
## INDEX=\'index-dynamic\' \
## THUMBS=\'_thumbspage-dynamic\' \
## useDynamicIndexLayout=True \
## dynamicLayoutPaddingH=\'4px\' \
## dynamicLayoutPaddingV=\'6px\' \
## inputCleanThumbsFolder=True \
## inputThumbMaxSize=100 inputUseViewerPages=True \
## popupFgColor=\'#ddd\' \
## popupOpacity=0.45
##------------------------------------------------------