diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-04-03 17:34:00 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-04-03 17:34:00 +0200 |
| commit | 5f3bb963f2214b2863620baeeca4ac61e0ceb9ec (patch) | |
| tree | 2bdddf85a957dd60e72ce9ac7c0d09fffc624e28 /src/cgg-dirgen | |
| parent | 2480b846db51b4381cb0c2a8cb6ee11fd19180f0 (diff) | |
| download | cataract-5f3bb963f2214b2863620baeeca4ac61e0ceb9ec.tar.xz | |
cgg-dirgen: Support the 'hires' image size
Used by the new fluid theme.
Diffstat (limited to 'src/cgg-dirgen')
| -rwxr-xr-x | src/cgg-dirgen | 13 |
1 files changed, 13 insertions, 0 deletions
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 <nofullsize /> 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 <nofullsize /"; fi if [[ ${EXT_EXIF} == "yes" ]]; then INCL_AFTER+=" <metadata>\n <external_exif src=\"${EXT_EXIF_PATH}/`echo ${i%.*}.exv | cut -b 3-`\" />\n </metadata>\n"; fi |
