Wednesday, 17 February 2010

My Mac can't count


Computers aren't what they used to be. They give up too early.

How many attachments in this email?


Monday, 28 December 2009

Happiness is...

... your 4 year old nephew telling you he "loves his new Nintendo DS" while you're attempting to play "Mopoly" (as he puts it) with him.

Deleting Flickr Albums from iPhoto

(or, how to live dangerously with the command line)

So when I set myself up with a Flickr account I thought - hey, now I can really integrate and publish my photos through iPhoto, since that is where they are all managed.

iPhoto really does make it easy - select some photos, click the Flickr button and away you go. Drag photos in and out of the Flickr albums and iPhoto syncs automatically with flickr.com. Great.

Apart from when you now want to disassociate the Flickr albums in iPhoto from flickr.com. Sure, you can delete the Flickr albums, but that also deletes the sets on flickr.com as well.

I'm looking for a way to delete Flickr albums from iPhoto, but leave the pictures on flickr.com intact.

There is a way through iPhoto to delete all Flickr albums associated with one account:

  1. select a Flickr album
  2. click the settings button on the toolbar
  3. click the button to remove the account
  4. now delete all Flickr albums (iPhoto will complain about username and password, but that's OK)

But to disassociate individual Flickr albums doesn't seem possible from within iPhoto without deleting the sets from flickr.com. (If there is a way, please let me know!)

So, if you want to live on the edge and feel in the mood for some hardcore SQLite command line voodoo with the risk of totally screwing up your iPhoto Library, then read on…

Of course, usual disclaimers apply from now on - I'm not responsible for you losing your cherished wedding photos or baby pictures, so don't be dumb: make a backup before you continue. Time Machine is good enough for a backup, but to be honest, just copying iPhotoMain.db will probably suffice. If you're mad enough to follow my instructions, then let us continue...

So, open a new Terminal window and enter the following commands:

$ cd "~/Pictures/iPhoto Library" (or wherever it is)
$ ls -l

You should see a file called iPhotoMain.db

$ sqlite3 iPhotoMain.db
sqlite> select primaryKey,publishServiceKey,publishedName from SqPublishedAlbum;

This lists all published albums (MobileMe, Facebook, Flickr, etc.) Make a note of the primary keys (the numbers in the first column) of the albums you want to delete. Now the dangerous bit...

sqlite> delete from SqAlbum where primaryKey in (x,y,z,…)
sqlite> delete from SqPublishedAlbum where primaryKey in (x,y,z,…)

Where x,y,z,… are the primary keys you made a note of earlier.

sqlite> .quit

Close the Terminal window and restart iPhoto. The albums you deleted should no longer be in iPhoto, but will still be on flickr.com.

If you find that iPhoto crashes when it starts, then you may have just deleted the albums from the SqPublishedAlbum table, and not from SqAlbum as well. Try the SQLite commands again. You should also delete the iPhotoMain.db-journal file as well.

The same principles probably apply for other publishing services like Facebook and MobileMe, but I've not tried this method them.

Tuesday, 3 November 2009

Sunday, 6 September 2009

Apple open-sourcing their apps?


Shirley you can't be serious? Anyone looked the examples in Snow Leopard's Developer Tools recently?

See that one called TextEdit? Yep, that's that TextEdit application you find in /Applications. The history of changes is an interesting read in README.rtf.

I wonder why they've done this? OK, so I'm pretty sure Apple aren't going to be publishing source code to all their other apps any time soon. I'm guessing it's to give other developers a look how to do things "the Apple way".

Friday, 4 September 2009


Two posts in 2 weeks? Steady on there!

Anyway, just a thought - now that Snow Leopard has OpenCL and is exploiting the power of GPU, when will we start seeing the Activity Monitor app showing GPU Usage and GPU History??

Does anyone know - are any apps installed with SL already using OpenCL?

Tuesday, 25 August 2009

Photography

This post reminds me of the episode of Red Dwarf, Me Squared, where Lister tries to find out why Rimmer's last words were "Gazpacho Soup". He finds Rimmer's diary:
January 1st: I have decided to keep a journal of my thoughts and deeds over the coming year; a daily chart of my progress through the echelons of command so that perhaps one day other aspiring officers may seek enlightenment through these pages. It is my fond hope that one day this journal will take it's place alongside Napolean's war diaries and the memories of Julius Ceasar.
Next entry - July 17th: Auntie Maggie's Birthday.
(It's November 25th, by the way - Gazpacho Soup Day.)

So, here we are, a mere 8 months since my last post. It's not Auntie Maggie's birthday (I don't have an Auntie Maggie anyway); I wanted to let my faithful readership know about my new hobby - photography.

I'm very pleased with my new Nikon D60. The D60 is getting on a bit, at about 18 months old now (in technology years, positively ancient!) but feature/quality/price trade-offs made it (in my opinion) the best option for me.

I realise buying an expensive camera won't automatically make my pictures better - it's so easy to take crap pictures with an expensive camera. I should know - I have! But with a good camera in hand, it's going to give me the impetus to get out there and practice.

So feel free to browse my photostream on flickr. Constructive criticism is welcome!

I'll add more existing pictures soon, and new ones as I take them. Visit regularly, or subscribe to my flickr RSS feed.

Enjoy.