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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.