From 5f3bb963f2214b2863620baeeca4ac61e0ceb9ec Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 3 Apr 2016 17:34:00 +0200 Subject: cgg-dirgen: Support the 'hires' image size Used by the new fluid theme. --- src/cgg-dirgen | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/cgg-dirgen b/src/cgg-dirgen index 4cff755..52d5c45 100755 --- a/src/cgg-dirgen +++ b/src/cgg-dirgen @@ -20,6 +20,8 @@ PREVIEW="no" PREVIEW_PATH="preview" +HIRES="no" +HIRES_PATH="hires" NO_FULLSIZE="no" EXT_THUMB="no" EXT_THUMB_PATH="thumbnails" @@ -35,6 +37,8 @@ print_help() echo " -?, --help Show help options" echo " -d, --preview [dir] Use supplied preview (web page) images" echo " - takes optional [dir] argument (default=\"preview\")" + echo " -h, --hires [dir] Use supplied hi-res images" + echo " - takes optional [dir] argument (default=\"hires\")" echo " -o, --nofullsize Do not copy original (full size) image" echo " - deprecated, use global tag" echo " -t, --thumbnails [dir] Use supplied thumbnails" @@ -56,6 +60,14 @@ while [[ $1 = -* ]]; do shift fi ;; + -h|--hires) + HIRES="yes" + shift + if [[ ! $1 == -* && ! "x$1" == "x" ]]; then + HIRES_PATH="$1" + shift + fi + ;; -o|--nofullsize) NO_FULLSIZE="yes" shift @@ -107,6 +119,7 @@ for i in `find -L . -maxdepth 1 -type f -iname '*.jpg' -or -iname '*.jpeg' -or - INCL=""; INCL_AFTER=""; if [[ ${PREVIEW} == "yes" ]]; then INCL=" preview=\"${PREVIEW_PATH}/`echo $i | cut -b 3-`\""; fi + if [[ ${HIRES} == "yes" ]]; then INCL+=" hires=\"${HIRES_PATH}/`echo $i | cut -b 3-`\""; fi if [[ ${EXT_THUMB} == "yes" ]]; then INCL+=" thumbnail=\"${EXT_THUMB_PATH}/`echo $i | cut -b 3-`\""; fi if [[ ${NO_FULLSIZE} == "yes" ]]; then INCL+=">\n \n \n"; fi -- cgit v1.2.3