HTML Image directory creation
russell cook
ruscook_oz at yahoo.com.au
Sun Mar 27 23:15:59 UTC 2005
Hi,
I've been using igal to create html thumbnail/image catalogs for my web
site and while very good it lacks a couple of features.
It's not recursive and even with the script below, doesn't handle
directories which are a placeholder for other directories. i.e. a
directory 2005 is just a placeholder for all picture directories I wish
to create of events in 2005. hmmm this may not make sense here's an
example:
./2004/Annalisa:
./2004/Braidwood:
./2004/CoffsHarbour:
./2004/EasterHunt:
In the above there are no files in directory 2004 only the other
directory entries. Each of the other directories has the image files
relevant to that event and needs to be catalogued.
Here's the script I've been using to run igal.
#!/bin/sh
DIR=/home/www/html/pics
cd $DIR
FILE=DIRLIST
ls -Rb1 >$FILE
while read LINE
do
if [ -d "$LINE" ] ; then
cd "$LINE"
echo Creating pictures in directory: "$LINE"
# pwd
igal -a -f -wx 960 --bigy 450 -w 7 --www --title "$LINE"
cd ..
fi
done < "$FILE"
This works on the first level of directory but doesn't truly recurse.
The file DIRLIST has the information but it seems the line, "if [ -d
"$LINE" ] ; then" is stripping the directory entry back to the last part
of the path. i.e. DIRLIST shows ./2004/Braidwood: but $LINE only reports
Braidwood.
So my script skills are not up to the task, and I'm not sure igal is
either (for what I want to do).
Any suggestions on
a) how to make igal truly recursive
b) how to create a index.html file that can be used to navigate the
directory structure
c) or info on any other programs that you know of that might do this
job for me?
Kind Regards Russell
==================
www.windsorcycles.com.au
bikes.no-ip.info
Linux user #369094
==================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050328/53714e81/attachment.html>
More information about the ubuntu-users
mailing list