diff options
| -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 |
