mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / gallery.mdwn
1 I've written up a little script ([[gallery.py]]) to generate HTML
2 galleries of my pictures.  There are tons of scripts to do this, but
3 this one's mine ;).  It uses [ImageMagick][]'s [mogrify][] to generate
4 thumbnails and supports per-picture captions via similarly named
5 caption files (e.g. `some-pic.jpg.txt` contains the caption for
6 `some-pic.jpg`).
7
8 You'll probably want to tweak the script to create appropriate header
9 or footer code for your particular site.  Perhaps I'll convert the
10 script to use [jinja2][] in the future.
11
12 The original script generated static HTML inside the image direcories.
13 This worked fine, but I don't run a high-traffic site, so keeping the
14 gallery up to date was more trouble than it was worth.  I've upgraded
15 my script (versions >0.4) to run via [[CGI]].  Versions >0.5 can
16 optionally run via [[SCGI]].  Now the gallery updates itself on the
17 fly when I add new pictures.
18
19 [ImageMagick]: http://www.imagemagick.org/
20 [mogrify]: http://www.imagemagick.org/script/mogrify.php
21 [jinja2]: http://jinja.pocoo.org/
22
23 [[!tag tags/fun]]
24 [[!tag tags/python]]
25 [[!tag tags/tools]]