Picasa for Linux: Export albums in sort order
Posted in Linux, Multimedia on January 12th, 2011 by Philipp C. Heckel – 1 CommentAs 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,4,...], 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.
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
Usage
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”.
- Console:
$ picasa-export ~/"Picasa\ HTML\ Exports/YourAlbum"
After that, the new folder “neworder” contains the renamed pictures.
Good stuff! Thanks for making it public!