X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=sh-gallery.git;a=blobdiff_plain;f=jpg2html.sh;h=e826dfc73a90e62246be6992145e70150fd3412f;hp=5a6d5a04d58427643fdb10240fc1762d4e5b5910;hb=HEAD;hpb=9b5cf664e4975fc26825a031a1f0cc3c492e72e7
diff --git a/jpg2html.sh b/jpg2html.sh
index 5a6d5a0..e826dfc 100755
--- a/jpg2html.sh
+++ b/jpg2html.sh
@@ -1,6 +1,6 @@
#!/bin/zsh
-files=(sony/DSC?????.jpg)
+files=(sony/DSC?????.jpg htc/IMG_*_??????.jpg)
len=${#files[@]};
touch all.tmp
@@ -21,6 +21,8 @@ for i in `seq 1 $len `; do
printf "next\n" $bn_next >> tmp
fi
+ printf " %s/%s\n" $i $len >> tmp
+
this=$files[$i];
bn_this=${this/.jpg/}
printf "\n" $bn_this.html $bn_this >> all.tmp
@@ -33,9 +35,12 @@ for i in `seq 1 $len `; do
cat $bn_this.desc >> tmp
fi
- cat tmpl_h.html tmp tmpl_f.html > $bn_this.html
+ rg="s/13371337/`basename $bn_this`/g"
+ (cat tmpl_h.html tmp; sed -e $rg tmpl_f.html) > $bn_this.html
rm tmp
done
-cat tmpl_h.html all.tmp tmpl_f.html > index.html
+printf "
download: hi-res, lo-res\n" >> all.tmp
+
+(cat tmpl_h.html all.tmp; sed -e s/13371337/dreadcutmain/g tmpl_f.html) > index.html
rm all.tmp