Help on creating a HTML by python
Gert-Jan den Besten
gj.den.besten at hccnet.nl
Mon Nov 29 04:29:49 EST 2004
sepgy writes:
> Can anyone help me to use a python to create an HTML photo gallery
> generator. When it's finished, it will be able find all the picture
> files (i.e. .jpg, .gif. .png files) in any given folder on the
> computer, automatically create smaller thumbnails for each image, and
> then generate a complete HTML file that displays a clickable image
> gallery. When viewed in a web browser, the HTML file will display the
> thumbnails in a neatly formatted table, and if you click on one of the
> thumbnails the full-size image will appear.
>
> Thanks
Your script is meant to create something like this?
http://home.hccnet.nl/gj.den.besten/20040822_maasbommel/html/overzicht_01.html
A few months ago I wrote this script to get familiarized with Python. It
has a few disadvantages:
* It is not written in English (in Dutch actually).
* Written using a procedural/modular programming style.
No classes are used, so it is not very "Pythonic"
* Written to meet my needs to get pictures published on my website.
* No GUI.
When I get rid of the first two disadvantages, I will publish the
sourcecodes on my website. It will be GPL'ed.
So far, I tested it on Linux and WinNT and it seems to work fine. It
uses the "Python Imaging Library" instead of "ImageMagick". Using PIL
gives it a better performance.
There is another option:
http://info.linspire.com/lphoto/
This is an Open Source application, built using Python. If you can get
the source, this may be your best choice.
Gert-Jan
--
Homepage:
http://www.GJdenBesten.nl
More information about the Python-list
mailing list