No code in this node, but was interested if anyone is doing something similar. I don't celebrate Christmas, but do enjoy the Holiday season. I tend to like to give things which are thoughtful, rather than things that will sit in a closet until someone can rewrap it and recycle the gift to someone else. So, this year I decided that I would take the multitude of pictures I have of myself, my wife, and mostly my daughter (the cutie in my home node), actually, 99% my daughter, and make a CD which is basically a website of images, sounds and video.

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
    I just wanted to mention a program which (I think) does something similar, for people who might be interested in what KM described but don't want to write the program: ids. I haven't actually used the program (only seen the results on a friend's site), so this might not be the right tool for this sort of task.

    Here's a brief blurb on the project:
    IDS (Image Display System) is a CGI written in Perl that generates a photo album website on the fly. All you need to provide are the images and (optionally) text descriptions. As you add new pictures, they will appear automatically. Each image will be displayed with information such as image type, file size, image size, and date uploaded. If EXIF information is embedded in the image (shutter speed, aperature, focal length, etc.), it will be displayed.

    It will create thumbnail preview images for JPEG, PNG, and GIF images. It will also recognize and display QuickTime movies, MPEG movies, and MP3 files.

    IDS will break up large albums into multiple pages.

    IDS uses HTML templates, so you can easily customize the look of your site.

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
    Excellent! This is the same idea I had for making Christmas gifts for out of town relatives. Since I got married in October, everyone wants a little more than just a Christmas card with a 3" x 5" pic in it. Glad to hear that it's not too tough to roll. I think the biggest hurdle for me will be scanning box after box of pics and trying to get wedding video captured into my box. (Anybody know of a good video capture card that still uses RCA inputs?)

    Guildenstern
    Negaterd character class uber alles!
      Guildenstern, There are many videocards available at bestbuy, most ranging around the 40 dollar mark. I believe they have coax and video (rca-yellow) inputs, but whatever the souce of the video is you can usually get an adapter to change the format (rca - coax etc.). In anycase, the $39.99 capture card should do the trick for you.
      Good Luck

      Dipul