This site is no longer updated. Thank you for visiting!

Behind the Scenes: Pictures of Mia Umali

Index | Caption Index

Every HTML page, with the notable exception of this page, is generated by a Perl program that I wrote. The primary motivation for writing a program was to automate the generation of the navigation links. The second motivation was simply "because I could".

Beginnings

The first eight or so pages were put together by hand. I had a template, which I copied over and over again. Two things happened that caused me to investigate writing a little program: 1. I started taking a lot of pictures. And 2. The navigation links were getting harder to build.

At the end of June, we baptized Mia. I had a lot of pictures and I wanted to get them up on the web quickly. By this time, every one of our direct family had seen her, but distant friends and co-workers were still asking when the picture site would be updated.

As I added more pictures, I needed to update the navigation links. My original pages had these links:

Previous - 3 of 20 - Next

But think about what has to happen to these links as you add pictures. That's right: every web page has to be modified to have a new count. Plus the last web page has to update its "Next" link. I also wanted to have navigation links to the first and last pages:

Start - Previous - 3 of 20 - Next - Last

I pulled out the old Perl code I used to make navigation links for the Graceland picture site. As I started using it, and refining it, I thought: why not make a program that not only makes the navigation links, but makes the web pages as well? And thus, a small Perl program is born.

The Program

I love Perl. This ubiquitous computer language is nifty, crafty, and perfect for what I consider "everyday recreational programming".

I wanted to adhere to a policy of simple pages. Small HTML pages. Small pictures (the largest JPEG is 54K). I also wanted to navigate forwards and backwards through the pages, and via a 'captions' or 'index' list. I wanted to also have "fixed" page names. Anyone who bookmarks a page won't have that page wiped out from under them.

Every page has a 'last generated' date. Every page has an 'original post' date, which allows the more-than-casual viewer the calculate how often the web site has been updated.

I completed the first cut of this program after the fourth of July weekend. The end result is a program that generates my web site in a few seconds, after updating only one file.

This is a very personal 'solution' for making a web site. I am the only 'user' of this program, and as a result, the code will probably delight only me. However, if you're interested, grab it at: http://www.rickumali.com/mia/gen-pages.pl

The Future

The last time I really tweaked gen-pages.pl was around December 2001. I've been shopping around for a new program to handle my list of TODOs. I like to think I could have written all of the features I wanted, but with so many tools out there, I decided it'd be better just to look around for one.

I've settled on JAlbum, a small yet potent program that runs circles around my little effort. JAlbum uses templates, generates thumbnails, and has a facility for uploading (I have to use a separate program with gen-pages.pl). David Ekholm, the author, wrote a very nice program, and I encourage you to check it out!

Details

The program was written with Perl 5.6.0 from ActiveState. It was edited with the GVIM text editor. The program runs within the Cygwin UNIX environment for Windows PCs. Every picture was recropped and/or retouched (brightened, sharpened) with Jasc Software's Paint Shop Pro.
Rick (rgu@TheWorld.com) Umali
Last Updated: February 20, 2004