Why making it yourself? Use the album tool from http://marginalhacks.com/Hacks/album/ Works great, Magnus The Purple Tiger wrote:
Hey all, I am running SuSE 8.0 professional [not that it makes much difference for this question].
What I am trying to do: Use a bash script to run several programs to resize some Jpeg images which have .JPG extenstions to 1/5 of their original size, and save the "thumbnail" as filename.jpeg, and then update a small little "index.html" file. Yes, a basic photogallery with clickable links.
What I am having problems with: I don't want to have to go through the directory and convert each file every time. What would be your suggestions to enable it to do "only new pictures" and then build the html file? Also, I would like to have some sort of "Percent Done" display [updated every file that is converted], although realise that may require a lot more work and it isn't essential. There may be slight errors in the script below as I have re-written it, and am in the process of testing it , but you will get the idea of what I am doing with it :-)
Thanks all!
Here is what I have:
#!/bin/bash for i in *.JPG ;\ do \ echo Converting $i to PNM ;\ jpegtopnm $i >temp.pnm ;\ echo Scaling $i to 20pc ;\ pnmscalefixed 0.2 temp.pnm >temp2.pnm ;\ echo Convert back to Jpeg thumbnail for $i ;\ pnmtojpeg temp2.pnm >`echo $i | sed s/.JPG/.jpeg/`;\ done
echo "<html><head><title>Camera Images</title></head><body bgcolor="#000000">" >index.html for i in *.jpeg ;\ do \ echo "<a href=`echo $i | sed s/.jpeg/.JPG/`><img src=$i></a>"
index.html;\
done
echo "</body></html>" >>index.html
Thanks!
-- Tigersden Conferencing support. Tel: 0114 296 6594 Fax: 0114 296 6594 email: JJeffels@tigesden.demon.co.uk <mailto:JJeffels@tigesden.demon.co.uk>