About a year ago I had some fun integrating Google Maps into the JAlbum Chameleon skin. Recently a couple of comments had been added to this blog post suggesting some improvements, so I sat down again, tried to remember how this worked and realized a couple of improvements. IMHO this solution could now easily be integrated into the standard JAlbum Chameleon skin.

What's improved?

  • For album directories that contain multiple index pages, the Google Map on each index page now shows the images for that index page. Previously only the first index page contained a working Google Map and it included pinpoints for all index pages.
  • The old version used an iframe to plug the Google Map into the JAlbum pages. This is no longer necessary because you can now use your Google Maps API key for a complete web domain (no longer bound to a specific directory). This now makes to generate all that is needed from JAlbum itself, no need to use an extra HTML file for the iframe that you had to manually put on your server.
For some examples, see this.

If you'd want to use this Google Maps integration then:
  1. Get yourself a Google Maps API key. (Just specify the domainname and not the subdirectory where your webalbum is hosted.
  2. Download the slide.htt and index.htt files and place them in JAlbum/skins/Chameleon directory (make of backup if the originals).
  3. Specify the following user setting in Settings/Advanced/User Variables:
  • # The root where the webalbum will be hosted
  • # The Google MAP API key that you've have created for your site (see step 1)
Note that I'm still using JAlbum version 8.1.5, it might not work (without changes) on newer versions of JAlbum. Actually, I'm hoping for a JAlbum skin to integrate this solution out of the box...

I've got all my photo's managed by iPhoto '09 on a Mac Mini and wanted to have a subset (like the last 6 months) of these pictures on my iPhone. I sync my iPhone with my MacBook Pro (not the Mac Mini), so the challenge was to get the pictures from iPhoto on the Mac Mini to iPhoto on the MacBook Pro and from there sync them to the iPhone. Piece of cake you'd think: iPhoto has a sharing option, simple create a smart album on the Mac Mini that has all pictures of the last six month, share that smart album and subscribe to that shared album from iPhoto on the MacBook Pro. Almost done, now I only have to tell iTunes on the MacBook Pro to sync that shared smart album to the iPhone.... bummer! It is not possible to sync shared albums you subscribed too to your iPhone :-( Now what?

I don't give up that easy. iPhoto also has a possibility to subscribe to RSS photo feeds and low and behold...these can be synced to the iPhone using iTunes. I create my webalbums using JAlbum and a while backI tweaked the JAlbum RSS feeds a bit to:
  1. make them work in regular RSS readers like GoogleReader and NetNewsWire, and
  2. ensure that items in sub folders are included in the main feed
That all worked fine but and when I subscribed to one of my albums feeds from iPhoto '09 it all seemed to work... initially. But taking a closer look I noticed that iPhoto was only downloading the thumbnails and not the high resolution version of the images. Bummer again, now what? The <media:content url="..."> tags in the feed were correctly pointing to the high resolution version of the images, but iPhoto was simply ignoring that (strangely it did use the <media:thumbnail url="..."> tags to download the thumbnails). A little Googling and searching in the iPhoto support forums would surely teach me what Apple requires for a feed to work in iPhoto.... no luck. I then took a look at some photo feeds published on Apple's MobileMe and subscribed to them from iPhoto. These worked fine. Only when I took a look at the contents of these MobileMe RSS feeds I quickly decided that I was not going to implement all that Apple proprietary tags in my feed. Increadible how much stuff was in there.

I forgot about the whole thing for a while and this week did a bit more Googling and stumbled on Photocastr:
"Making it easy to turn flickr photos into iPhoto v6+ compatible photocasts"

If they can figure it out, then I should also be able to reverse engineer that. After taking a closer look at the RSS feeds they created I noticed that they had a few iPhoto specific tags included and most importantly they used the tag. Adding that enclosure tag did the trick. No need for iPhoto specific tags, no bloated RSS feeds and the feeds still pass the feedvalidator.org tests. The enclosure tag is defined in RSS 2.0, and Apple iPhoto is properly working without requiring all kinds of proprietary tags.

Now I can sync the pictures to my iPhoto, not directly from the iPhoto on the other machine, but since I automatically publish a subset of the iPhoto to my JAlbum webalbum, this works fine for me. There is still one drawback: iPhoto '09 "Faces" functionality does not work on pictures in RSS feeds, something left to wish for ;-)

Note: to get the original (high resolution) images available in your JAlbum webalbum you have to set "Link to originals via scaled images" in the JAlbum Settings/Navigation tab.

The updated album.rss template file can be downloaded here, see the original blog post for how to install and use it.

I recently turned on Google Sync for the iPhone to enable wireless syncing of my Google calendar and contacts with my iPhone. A limitation of the current version of Google Sync for the iPhone is that it only supports 5 Calendars. I've got more than 5 Calendars in Google Calendar so that's a problem. Fortunately, many of these Calendars are read only (e.g. public/school holidays, your favorite teams game schedule, etc.) and by combining multiple read-only calendars into 1 read-only calendar it is possible to get them all sync-ed between Google Calendar and you're iPhone.

Now all we need is a utility that merges the calendars. Enter merge-ics, a Python script that reads all .ics files in a file system directory and merges them into one new .ics file which you can then import into Google Calendar. Instead of syncing the individual calendars to you iPhone, you now simply sync the combined one. You loose the per calendar color for the merged calendars, but that's acceptable for me.

Of course you can manually download the .ics files of the individual calendars and then import the combined .ics file into Google Calendar, but wouldn't it be nice is this is automated? Do do that I created a shell script that:

  1. downloads individual calendar .ics files. The URLs of these calendars are stored in a text file.
  2. kicks of the merge-ics python script to combine the .ics files

In addition I'm hosting that combined .ics file on my webserver, subscribed to it from Google Calendar and scheduled the script to run on a daily basis. So now I'm able to sync these read only calendars to my iPhone without further manual intervention.

Below are the shell script and an example text file contains the calendars to be merged. If you'd want to use it, make sure you update the variables at the beginning of the script and also update the variables in the merge-ics.py Python script. Needless to say that you'll need to download and install that script form the merge-ics site.

# Script takes one argument: filename containing the URLs of the
# Calendar .ics files to be downloaded.



# Get new copies of the ICAL files
for url in `cat ${ICALSFILE}` ; do

# Only successfuly downloaded files are copied to
# ${TARGET_ICS_DIR} to be able to deal with temporarily
# unavailability of a calendar.
rm -f ${TEMP_ICS_FILE}
wget -q -O ${TEMP_ICS_FILE} ${url}
if [ $? -eq 0 ]; then
cp ${TEMP_ICS_FILE} ${TARGET_ICS_DIR}/`basename ${url}`
echo "Calendar ${url} could not be retrieved"


# Run the merge_ics script

Example text file with input:


After moving my mail en calendar to the cloud I decided to also to stop hosting my own blog. I've been using Pebble for well over 5 years and have mostly been pretty happy with it. Why?

  • Running you own does consume some maintenance time (do upgrades, etc). Especially re-doing the tweaks to templates etc became a hassle.
  • I had occasional problems doing posts (typed in a full post, hit the button and ooops... post gone. May well be caused by local set up but even in that case it's even better to move it out).
  • It blocked me from doing major OS updates since I wanted to prevent downtime (and I finally want to upgrade my Mac Mini to Leopard).
  • It's dependent on the availability of my server and network connection. Both are pretty reliable but still...
  • Using Cloud services is this years hype ;-)

Getting a blog setup with Google Blogger is easy, but of course you also want to migrate the old blog posts and not break the links from other sources to you blog. I digged around hoping to find an easy way to migrate the blog posts to Google Blogger and somehow redirects visitors from the old to the new location... no luck. Google Blogger does have an import option, but it only imports it's own exports and the only tool I found migrates from Wordpress to Google Blogger. So I had to scratch my own itch and created a simple command line utility that:

  • Reads the original Pebble posts and posts them to Blogger. This includes comments but due to limitations in the Google Blogger API the details of the original poster of the comment had to be included in the comment text and I show up as the poster. (Google does not allow to specify another author as poster of a comment though the API to prevent spam.)
  • Validates links in blogs posts and attempts to fix them where possible (for example links between blog posts that would break when moving to new location). If it can't fix a link, it reports this in the log file.
  • Generate a redirects file that you can include in your Apache httpd.conf to redirect visitors that access the old location to the new location of a post.

You can find the utility here: Blogger Importer. Feel free to use or extend it. I did the trick for me, but maybe you need some additional features. The current version only works for Pebble but it is set up such that you can easily plug in other sources and migrate these to Blogger.

A limitation of hosting my blog at Blogger is that it's less easy to create plugins. For Pebble I created my own plugin that would post a message on Twitter each time I created/updated a blog post. There's no such plugin for Blogger (yet) and I don't think Google provides hooks in their Blogger Dashboard where I could stick that functionality in. There is a service (TwitterFeed) that does this, but then you'd have to provide your Twitter credentials to that site... not sure if I'd want to do that.

Another point I have to fix are the Google Maps integrations that I did for showing Skeeler routes. For Pebble I created a 'decorator' plugin that would do some tweaks to the blog post contents which caused it to show the skeeler route on a Google Map. This is now broken and I have to find a solution for that (worst case I'd have to 'hardcode' it into the blog posts themselves, would be nice if it's a more elegant solution though).

As a heads up...

I'm migrating my blog from self-hosted Pebble to Google Blogger. I'll be doing this in the coming days so you may want to update your feed settings:

New blog location: http://blog.vermaas.net
New feed: http://blog.vermaas.net/feeds/posts/default

Since version 8 JAlbum supports RSS feeds for the generated webalbums. Unfortunately, the feeds are not accepted by standard RSS readers like Google Reader and NetNewsWire. Bummer! The problems are caused by:

  1. the fact that the generated feeds contains relative URLS (and RSS requires absolute URLs)
  2. the way JAlbum feeds try to include feeds of subfolders. The goal of including the items of subfolders in the parent RSS feed is to make it possible to subscribe to 1 feed and also get items in subolders included (instead of having to subscribe to each subfolder feed separately). JAlbum uses a proprietary JAlbum tag (<jalbum:link..>)to include sub folder RSS feeds and this tag is nog recognized by regular RSS feeds

You can try this out by running the generated feeds through feedvalidator.org. As an example, here's the result of running an original JAlbum generated RSS feed through feedvaidator.org. In addition to the reported erros, the <jalbum:link..> tags are nog recognized by regular RSS readers.

Luckily JAlbum is pretty open and you can easily customized skins and also the template that generates the album.rss feed. The issue with the relative URLs could easily be fixed by adding a user defined variable in JAlbum and some minor adjustments to the album.rss template.

The issue with the inclusion of images from subfolders required a bit more work. It appears that there is no (standard) way to have an RSS feed include another RSS feed. So I changed the albums.rss template such that items of subfolder are also added to the album.rss feed file of the parent folder. No real inclusion and it feels a bit redundant to include items in the RSS feed of the folder itself and in the feeds of all parent folders, but at least the feed is now working in regular RSS readers. Here's an example of a feed.

While implementing the new template file I did run into a few problems that I could not explain, but did find a workaround for. First, it was not possible to use a javax.xml.transform.Transformer, but using org.w3c.dom.ls.LSSerializer it worked fine. Second, some of the standard JAlbum variable sdid not always have the same Java type and sometimes were simply not set when trying to access them from the album.rss tempate. So I had to test for this, try to convert to required type where possible and if all failed, the picture is ignored and not included in the RSS feed. The template now runs successfully on my webalbum picture collection (4500 pictures).

Also want to use this?

  1. Make a backup of the Jalbum/system/album.rss file. This is the original template file.
  2. Download the updated album.rss file and copy it to Jalbum/system directory
  3. Add a user variable 'webroot' to your JAlbum project. Go to Settings/Advanced/User Variables. The value of this variable should be the root of the webalbum on your webserver (for example http://my.domain/webalbum)
  4. (Optionally) Add a user variable rssItemsNotOlderThanDays to your JAlbum project. If set, then only pictures which is not older than 'rssItemsNotOlderThanDays' days are included in the RSS feed. If not set, all pictures found are included and that may lead to rather big feed files.
  5. --ADDED--
    (Optionally) Add a user variable topAlbumTitle to your JAlbum project. If set, then the value of the variable will be used as the title for the top level directory (if not set, the title of the top level directory is empty).
    -- EA ADDED--

Note: I've been using this with JAlbum version 8.1.5. I suspect that it will work with all 8.x versions, but I'm not sure.


Based on suggestions in the JAlbum forum I made some minor changes to the template:

  • JAlbum variable mediarssDate is used a pubDate (instead of picture date, this was already the case in the original template)
  • Added copyright notices
  • Corrected the way the guid is determined