The Bull Og

Onine since 1994. Offline since 1976.

See also the archive

An individual post follows.

This last weekend I was finally able to sit down and pound out my first Ruby script. Now I can grab the 790 pics I have in my Gallery installation and thanks to the B-Tree, order them by the upload date.

(There must be a better way to do the regexs in Ruby but I think it's not too bad for a first stab.)

The next step is to make use of the Flickr API to upload all the pics and set info accordingly.

What to do about tags? In the next iteration, I think I'm going to put a "tags.txt" file in each Gallery album directory in order to ascribe at least a few tags to the photos as they're being uploaded.

Just for fun, here's a taste of the Gallery metadata files (photos.dat) that serve as the input for parsing. Good times.

a:17:{i:0;O:9:"AlbumItem":19:{s:5:"image";O:5:"Image":12:{s:4:"name";s:8:"100_0559";s:4:"type";s:3:"jpg"; s:5:"width";i:640;s:6:"height";i:480;s:11:"resizedName"; s:14:"100_0559.sized";s:7:"thumb_x";N;s:7:"thumb_y";N; s:11:"thumb_width";N;s:12:"thumb_height";N; s:9:"raw_width";i:1200;s:10:"raw_height";i:900; s:7:"version";