As one of the best picture organizers out there, Picasa is (in my opinion) almost complete in terms of features and has a nice look and feel at the same time. Even though Google stopped developing the Linux version after 3.0, it still works perfectly using Wine and a couple of cp-statements.
However, as stated many times by Picasa users and bloggers [1,2,3,…], Picasa’s export function misses a tiny little feature that maintains the sort order of the album when exporting it to a folder. Instead of renaming the pictures to keep them sorted in normal file managers (by name), Picasa just copies the files of an album to one folder and thereby destroys the order. As if that wasn’t enough, Picasa also overwrites duplicates filenames from different source folders.
This missing feature has even led to small standalone projects that fix this issue, e.g. Picasa Independent Album Exporter (PIAE) and Picasa Order Preserver. While both applications do their job, both are a bit heavyweight, and PIAE only works for Windows (and not on Wine).
This post presents a tiny little Perl script that renames pictures of an exported album according to their Picasa sort order.
1. Download & Installation
The script requires Perl module XML::Simple to be installed. In Debian/Ubuntu, install the package libxml-simple-perl.
Download the script, save it to your preferred location and make it executable:
sudo apt-get install libxml-simple-perl
sudo wget -O /usr/local/bin/picasa-export http://blog.philippheckel.com/uploads/2011/01/picasa-export
sudo chmod +x /usr/local/bin/picasa-export
That’s it for the installation.
Download: Picasa Export 0.1, January 2011
Using the script is also very simple. Simple export the desired album using Picasa’s “Export to HTML Page” function and call the script with the exported folder as parameter.
Example with “YourAlbum”:
- Picasa: Click “Folder” → “Export to HTML Page…”. Select “XML Code” in the template list. Click “Export”.
Shell1picasa-export ~/"Picasa HTML Exports/YourAlbum"
After that, the new folder “neworder” contains the renamed pictures.
I'd very much like to hear what you think of this post. Feel free to leave a comment. I usually respond within a day or two, sometimes even faster. I will not share or publish your e-mail address anywhere.