Python script to create HTML gallery, thumbnails

ccang calcium at ozemail.com.au
Sat Mar 24 09:17:56 EST 2001


Hi there all,
I recently got a digital camera (Kodak DC4800) and wanted to
put all the crappy photos I shoot on the web.

I looked for software to create thumbnails and corresponding
HTML files but couldnt find any so I wrote my own using Python
and the PIL.

It creates a consolidated thumbnail and the corresponding HTML files.

No GUI yet so u'll have to edit the script to customize
your settings eg page headers, comments.

# Does only JPGs for now.
# Usage : python mkgallery.py [ filenames ]
#   Will produce 1 HTML file for the thumbnail index.
#                1 HTML file per JPG image.
#                1 consolidated thumbnail JPG.
#
# There will be GUI for this pretty soon.
#
# The HTML file for the thumbnail is generated in the same
# directory as where the script is run from.
# However, it assumes that it will reside
# in a subdirectory above where the other files (HTML, JPGS) reside.
# ie u'll have to move it.
#
# eg
#   myGallery/
#   myGallery/topic.html
#   myGallery/topic/topic_index.jpg
#   myGallery/topic/zpic1.jpg
#   myGallery/topic/zpic1.html
#       ...
#       ...
#   myGallery/topic/zpicN.jpg
#   myGallery/topic/zpicN.html
#

http://www.ozemail.com.au/~calcium/scripts.html

Sample output
http://www.ozemail.com.au/~calcium/rogaine.html

Feedback welcome,
Chai
--
| mailto:calcium at ozemail.com.au   | +61 401 688 408
|  http://www.ozemail.com.au/~calcium
|  I dont use the voice of Bart when I'm making love
|  to my husband, but Marge's voice turns him on a
|  little - Nancy Cartwright.




More information about the Python-list mailing list