[Nottingham] Image list
Roger Light
roger at atchoo.org
Fri Dec 1 13:05:26 GMT 2006
On 01/12/06, Robert Ross <rross at dmu.ac.uk> wrote:
> >so you might have
> > to get ImageMagick and do...
>
> Hmmm, starting to look that way, but would be loath to do it.
Yet you're happy with having konqueror? :)
This is what I'd do. I've made it easy to improve so that we can talk
about this all afternoon...
for pic in /var/www/images/*; do
size=$(ls -l /var/www/images/${pic} | awk '{print $5}')
width=$(identify ${pic} | awk '{print $3}' | sed -e 's/x.*//')
height=$(identify ${pic} | awk '{print $3}' | sed -e
's/.*x\([0-9]*\).*/\1/')
echo "${pic},${size},${width},${height}" >> list.csv
done
That'll give you a csv file that you should be able to import into the
database of your choice.
Cheers,
Roger
More information about the Nottingham
mailing list