summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-08-10 18:10:18 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-08-10 18:10:18 +0200
commit36bfdb4704a6d7b8f46f69f4c5c5d3372f1064fc (patch)
tree5ecc8ab56dda76f162235eb513433b0dc9e9ac68
parentd37bcc1685bf3e9c1583959ef3e96f59beb055d0 (diff)
downloadcataract-36bfdb4704a6d7b8f46f69f4c5c5d3372f1064fc.tar.xz
Modify cgg-dirgen to support external thumbnails
-rwxr-xr-xcgg-dirgen5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgg-dirgen b/cgg-dirgen
index 6946ca6..44dd256 100755
--- a/cgg-dirgen
+++ b/cgg-dirgen
@@ -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