How to do this in an easy way? Well, Perl to the rescue! I have all the images needed in subfolders on my laptop, organized by date (the date I uploaded the pics from my camera). I had already gone through and cropped images, so I needed to just create the "web site" I will burn onto CD. I made one file, which is a template, that defines what the HTML page for each picture will look like, and one script which traverses the directories, creates thumbnails (using Image Magick) of the images, creates a directory index of those thumbnails (and the image names become the titles), and links to the appropriate image HTML. So, thanks to Perl, I was able to create a "web site" of over 300 pages in a matter of seconds. I can tweak my template, and re-create it in a matter of seconds. The script took about an hour to write, and my family will be getting a special present.
I'm not going to post the code, since it is a messy hack I never intended for people to view, but I actually did it two ways. One, was by using Apache::Album, which can do much of this for you (mod_perl module), and I rolled my own by using Image::Magick, Image::Size and CGI.pm.
I just thought I would share this, since it is yet another aspect of my life Perl has come in use. I also hope people may share similar things they have done.
Cheers,
KM
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(kudra: ids?) Re: Holiday Gifts, Made with Perl
by kudra (Vicar) on Dec 01, 2000 at 02:24 UTC | |
|
Re: Holiday Gifts, Made with Perl
by merlyn (Sage) on Dec 01, 2000 at 02:32 UTC | |
|
(Guildenstern) Re: Holiday Gifts, Made with Perl
by Guildenstern (Deacon) on Dec 01, 2000 at 20:56 UTC | |
by ImpalaSS (Monk) on Dec 08, 2000 at 22:41 UTC |