diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-10 18:10:18 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-10 18:10:18 +0200 |
| commit | 36bfdb4704a6d7b8f46f69f4c5c5d3372f1064fc (patch) | |
| tree | 5ecc8ab56dda76f162235eb513433b0dc9e9ac68 /cgg-dirgen | |
| parent | d37bcc1685bf3e9c1583959ef3e96f59beb055d0 (diff) | |
| download | cataract-36bfdb4704a6d7b8f46f69f4c5c5d3372f1064fc.tar.xz | |
Modify cgg-dirgen to support external thumbnails
Diffstat (limited to 'cgg-dirgen')
| -rwxr-xr-x | cgg-dirgen | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -21,6 +21,7 @@ ## Optional arguments (must be in order, for now): ## -d Use preview pictures from the "preview" folder ## -o Do not include original image (removes link to original size) +## -t Generate thumbnails from the "thumbnails" folder cat << XML_HEADER_STOP @@ -39,9 +40,11 @@ XML_HEADER_STOP for i in `find -L . -maxdepth 1 -type f -iname '*.jpg' -or -iname '*.jpeg' -or -iname '*.gif' -or -iname '*.png' | sort`; do INCL=""; INCL2=""; + INCL3=""; if [ "$1" = "-d" ]; then INCL=" preview=\"preview/`echo $i | cut -b 3-`\""; fi if [ "$2" = "-o" ]; then INCL2=" <nofullsize />\n"; fi - echo -e " <item src=\"`echo $i | cut -b 3-`\"${INCL}>\n${INCL2} <title> </title>\n <title_description> </title_description>\n </item>\n"; + if [ "$3" = "-t" ]; then INCL3=" thumbnail=\"thumbnails/`echo $i | cut -b 3-`\""; fi + echo -e " <item src=\"`echo $i | cut -b 3-`\"${INCL}${INCL3}>\n${INCL2} <title> </title>\n <title_description> </title_description>\n </item>\n"; done cat << XML_FOOTER_STOP |
