Summary

MAlbumScript is a piece of JavaScript that extends Picasa's web album generation capabilities by reading its XML output and telling a webbrowser how to render the album. MAlbumScript relies on the use of the XMLHttpRequest object to read data from Picasa's XML. Based on the requested URL, the scripts knows to generate HTML to display a page of thumbnails, or a particular image with a thumbnailed navigation bar.

Introduction

I am certain every digital shutter-bug has their own workflow for archiving and sharing their digital photos. My workflow maintains an archive of every photo I take, organized by date, and a second set of albums that are for sharing. In the past, I would need to manually copy the photos that I wanted to share and then use and application to generate the web pages/thumbnails etc. so that I could share these pictures. I wanted to streamline my workflow into a single application. At first I thought I should write my own. This was cool, it did most things I wanted to do, exactly how I wanted to do them. However, the processing times were brutally slow.

But I could not defeat the voice in my head that said that Picasa could do 90% of what of what I wanted to do really, really well. The one thing it couldn't do was output web albums that I like. It could, however, output XML that encoded all the information I needed. If I could just display it properly, I would be set!

I thought about XSL but didn't know it would be smart enough to figure out that I only wanted a single picture displayed. Nor did I want to edit the xml to point to the XSL file. Since I had recently learned that javascript was able to work with XML, I was on my way to making one index.html to rule them all :-P The index.html has the javascript that generates the album, the XML file specifies which pictures to use, and CSS files tell you how the page will look. I display my albums in iFrames in the context of my site, but I wouldn't mind have a slightly larger album to display on its own. Now the same html/javascript/xml can pick the appropriate CSS and I only have to export the album once!

Goals

  • Extend Picasa's web album generation capability

How it works

  • Uses javascript to read Picasa's XML and dynamically create the appropriate html.
  • Simply put the index.html in the same directory as the index.xml and the script takes care of the rest
  • The script will also "shrink" the images if the album is being displayed in a frame
    • The shrinkage is determined in a stylesheet

Extensions (To Do list)

  • Cleanup javascript code
  • Abstract out as many preferences as possible

Download and Sample

Author / Contact / Bug Report Receiver