MetaCategories |
Saturday, July 19. 2008iPhoto Libraries in mythgallery (mythtv)
Here's some information about a personal coding itch I scratched recently, on the off chance that it helps someone else out there. Certainly my Google skills didn't turn up anyone else who had solved the same problem.
Problem Description You have a Mac somewhere where you use Apple's excellent iPhoto to manage your huge digital photography collection. However, you don't have (and most likely don't want) a spiffy but locked-down and feature-light Apple TV to display them on your TV, instead preferring the excellent and far more versatile open-source mythtv. Mythtv has mythgallery which displays pictures from a normal filesystem reasonably well, but the poor thing has little to no understanding of the complexities of Apple's "iPhoto Library" on-disk layout. I'm talking Albums basically, plus an understanding of "Originals" versus "Modified". I just want it to be how it looks in iPhoto, but on my big LCD screen in front of the couch, controlled with my myth remote. Is that too much to ask??! Research/Analysis Can't find anyone else with this issue so figure "how hard can it be?". Not very, it turned out, at least to get something working, if ugly. The perl Mac::iPhoto looks like a good place to start, but since it hasn't been touched since 2003 it certainly doesn't do anything much useful on my current (7.1.3) iPhoto Library. It uses Mac::PropertyList to do the parsing of the xml file, which doesn't seem to work either. After much fiddling it looks like the AlbumData.xml file in the iPhoto Library actually is invalid - it doesn't have the proper header. First hack Mac::PropertyList to accept the dodgy header, but later decide to keep that standard and put the hack into my script instead. Design Decide to make a directory next to the iPhoto Library which is full of symlinks pointing into the actual library. Directories in this tree will correspond to Albums in iPhoto, and the links will be named such that the alphabetical order used by mythgallery corresponds to the order in iPhoto. Try and get this working on the linux box and also via Samba but in the end it's simplest to run the code and create the symlink tree on my mac and then rsync both the iPhoto Library and the symlink tree across to the linux box. Don't use samba, it stuffs up the annoying ":" that iPhoto uses in paths, at least for me. rsync handles it fine, it's not even that Mac-specific one to my knowledge, just whatever is on my Ubuntu box. Code You'll need Mac::iPhoto 0.1-timg, which is the modification of 0.1 available on cpan to work with iPhoto 7.1.3, and Mac::PropertyList 1.31 from cpan. I guess I should put my code on CPAN, but just wanted to get it all up here for now. Once that's available, you will of course need the actual iPhotoToDirectories script. It's all hard-coded - but you wouldn't have made it this far if you couldn't edit it to work in your situation :) Operation You'll need the same directory structure on both the mac and the linux box as the symlinks get created on the mac but are de-referenced on the linux box. Once it's all in place, run iPhotoToDirectories on your mac whenever you want. It takes a long time, so I wouldn't script it. Maybe an overnight cronjob if you keep your Mac on all night. I don't so I just run it when I remember. Then rsync both the iPhoto Library and the symlink tree to the linux box. Finally, chmod -R a+rx the linux directories if the uid on your mac is different from your myth user. And then, assuming mythgallery can navigate to that symlink directory, it should work and the browsing should be significantly more useful than it was before browsing the raw directory. Known issues
But hey it works! And with a full-time life that's enough for me right now.
Posted by Alison Gould
in Hardware, Linux, Open-Source, Photography, Projects, PVR, Software
at
09:19
| Comment (1)
| Trackbacks (0)
Sunday, October 9. 2005ThoughtThing 0.4
It's been a long while since the last update, but I've just released version 0.4 of my toy software project ThoughtThing. You can read more about what it does here.
In the great spirit of Open Source software, someone else did most of the work by changing my code for his purposes, and then sent the changes back to me so I could share them with everyone else. A bit of polish and everyone benefits. He actually used the software to track the organisation of a conference with other people - it's quite nice when something I developed as something to do while looking for work when first back in Sydney has helped someone on the other side of the world organise a conference. Friday, January 16. 2004ThoughtThing 0.1 Released
I've just made the first release of a software project I've been working on - ThoughtThing.
The basic concept is that my brain doesn't work in a hierarchical manner, while the file system on my computers (and pretty much everyone else's) insists that I organise my 'stuff' in that way. In ThoughtThing, you build 'nodes' around yourself, and then define links between them in ways that make sense to you. Each node can have unlimited parents or children, each of which is another node. Each node can either be empty (a 'container' node), or have a URL tosomething - a website, a contact (as looked up in a vCard file), local pdf,whatever really. In this way, you are free to build as complex a 'web', 'ThoughtThing' or 'TT' as you like, and link to whatever you find you need to organise. If you want to try it out, you need a webserver, MySQL and PHP, and then to go and down load the code and let me know what you think :)
(Page 1 of 1, totaling 3 entries)
|
QuicksearchArchivesPowered byLicense |