it* Simple Justified Gallery Err codevoid.de 70 i Err codevoid.de 70 hgit clone git://git.codevoid.de/mkpicindex URL:git://git.codevoid.de/mkpicindex codevoid.de 70 1Log /git/mkpicindex/log.gph codevoid.de 70 1Files /git/mkpicindex/files.gph codevoid.de 70 1Refs /git/mkpicindex/refs.gph codevoid.de 70 1README /git/mkpicindex/file/README.gph codevoid.de 70 i--- Err codevoid.de 70 1commit f0175a7ee17921abd67f45c3a2eb269cf3565160 /git/mkpicindex/commit/f0175a7ee17921abd67f45c3a2eb269cf3565160.gph codevoid.de 70 1parent c689653652b10f69f0955045bf8d860643aadb42 /git/mkpicindex/commit/c689653652b10f69f0955045bf8d860643aadb42.gph codevoid.de 70 hAuthor: Stefan Hagen URL:mailto:sh+git[at]codevoid[dot]de codevoid.de 70 iDate: Sun, 27 Oct 2019 14:42:02 +0100 Err codevoid.de 70 i Err codevoid.de 70 iSupport CLI Options Err codevoid.de 70 i Err codevoid.de 70 iDiffstat: Err codevoid.de 70 i M Makefile | 2 +- Err codevoid.de 70 i M mkpicindex-static.sh | 41 ++++++++++++++++++++++++++++--- Err codevoid.de 70 i Err codevoid.de 70 i2 files changed, 39 insertions(+), 4 deletions(-) Err codevoid.de 70 i--- Err codevoid.de 70 1diff --git a/Makefile b/Makefile /git/mkpicindex/file/Makefile.gph codevoid.de 70 it@@ -1,6 +1,6 @@ Err codevoid.de 70 i all: Err codevoid.de 70 i ./mkpicindex.sh > index.html.tmp && mv index.html.tmp index.html Err codevoid.de 70 i static: Err codevoid.de 70 i- ./mkpicindex-static.sh 0 > index.html.tmp && mv index.html.tmp index.html Err codevoid.de 70 i+ ./mkpicindex-static.sh > index.html.tmp && mv index.html.tmp index.html Err codevoid.de 70 i clean: Err codevoid.de 70 i rm -rf index.html.tmp index.html style.css justify.js LICENSE Err codevoid.de 70 1diff --git a/mkpicindex-static.sh b/mkpicindex-static.sh /git/mkpicindex/file/mkpicindex-static.sh.gph codevoid.de 70 it@@ -11,8 +11,8 @@ printf '%s' \ Err codevoid.de 70 i Err codevoid.de 70 i # CONFIGURE Err codevoid.de 70 i TITLE="My Gallery" # browser title Err codevoid.de 70 i-WIDTH=1000 # how wide will the gallery be Err codevoid.de 70 i-ROW_HEIGHT=150 # how high will the justified rows be? Err codevoid.de 70 i+WIDTH=850 # how wide will the gallery be Err codevoid.de 70 i+ROW_HEIGHT=180 # how high will the justified rows be? Err codevoid.de 70 i THUMB_QUALITY=83 # quality for thumbnails Err codevoid.de 70 i THUMB_PATH="thm" # relative path to thumbnail folder Err codevoid.de 70 i THUMB_PADDING="6" # image padding Err codevoid.de 70 it@@ -21,6 +21,41 @@ THUMB_PADDING="6" # image padding Err codevoid.de 70 i DEBUG=0 # debug output Err codevoid.de 70 i THREADS=4 Err codevoid.de 70 i Err codevoid.de 70 i+# PRINT HELP / USAGE TEXT Err codevoid.de 70 i+usage() { Err codevoid.de 70 i+ printf '%s\n' \ Err codevoid.de 70 i+'Usage: mkpicindex [option] > outfile.html Err codevoid.de 70 i+ Options: Err codevoid.de 70 i+ -t "My Gallery" - Title Err codevoid.de 70 i+ -w 850 - Width Err codevoid.de 70 i+ -h 180 - Row height Err codevoid.de 70 i+ -q 83 - Thumbnail quality Err codevoid.de 70 i+ -b 6 - Thumbnail border Err codevoid.de 70 i+ -p 8 - Max convert processes Err codevoid.de 70 i+ -d - Debug mode Err codevoid.de 70 i+ -h - This help Err codevoid.de 70 i+' Err codevoid.de 70 i+ exit 2 Err codevoid.de 70 i+} Err codevoid.de 70 i+ Err codevoid.de 70 i+# OVERIDE DEFAULTS Err codevoid.de 70 i+while getopts 't:w:h:b:q:p:d' c Err codevoid.de 70 i+do Err codevoid.de 70 i+ case $c in Err codevoid.de 70 i+ t) TITLE="$OPTARG" ;; Err codevoid.de 70 i+ w) WIDTH="$OPTARG" ;; Err codevoid.de 70 i+ h) ROW_HEIGHT="$OPTARG" ;; Err codevoid.de 70 i+ q) QUALITY="$OPTARG" ;; Err codevoid.de 70 i+ b) THUMB_PADDING="$OPTARG" ;; Err codevoid.de 70 i+ p) THREADS="$OPTARG" ;; Err codevoid.de 70 i+ d) DEBUG=1 ;; Err codevoid.de 70 i+ ?|*) usage; ;; Err codevoid.de 70 i+ esac Err codevoid.de 70 i+done Err codevoid.de 70 i+ Err codevoid.de 70 i+# PRINT USAGE IF OUTPUT IS NOT REDIRECTED Err codevoid.de 70 i+[ "$DEBUG" != 1 ] && test -t 1 && usage; Err codevoid.de 70 i+ Err codevoid.de 70 i # GLOBAL TMP VARIABLES Err codevoid.de 70 i G_ROW_WIDTH=0 # combined pic width < WIDTH @ ROW_HEIGHT Err codevoid.de 70 i G_ROW_FILES="" # pipe separated files < WIDTH Err codevoid.de 70 it@@ -139,7 +174,7 @@ printf '%s\n' \ Err codevoid.de 70 i ' Err codevoid.de 70 i Err codevoid.de 70 i Err codevoid.de 70 i- My Gallery Err codevoid.de 70 i+ '"$TITLE"' Err codevoid.de 70 i