Mass add keywords to iPhoto with Launchbar

I was playing with iPhoto this morning and decided that, really, it would be better to properly tag my photos and use smart collections, rather than have them in unwieldy folders which clutter up the left sidebar, and which I can’t delete without losing the associated classifications. (If I don’t keep a folder called “Cats” current, I’ll never be able to find all pictures of cats again, unless the next version of iPhoto includes an automatic cat recognition routine, which actually isn’t all that bizarre an idea, but anyway.)

The first thing I discovered was that I couldn’t see any way to add tags – or rather, keywords, as iPhoto calls them – en masse, which seemed very odd. (It may have a mechanism which I didn’t find.) But that’s what we have Applescript for isn’t it?

Continue reading

Launchbar, Circus Ponies, lists and blobs

I’m very fond of Circus Ponies Notebook. All right, this is something of an understatement; I am excessively fond of Circus Ponies Notebook, and use it for almost all of my project work. If you’re not familiar with the program, it’s a multi-function outliner/editor/note-taker/freeform database thing that is tied together with a cute “spiral notebook” UI metaphor.

I tend to use Yojimbo to capture “blobs” of information, which don’t have an immediate category and aren’t part of an existing list – say:

  • the URL of a good blog entry I just read, which is interesting and well written but has no relevance to any work I’m doing;
  • an irritating piece of Applescript syntax that I had to google to work out, and may have trouble with later;
  • a phone call I just received from my bank;
  • an idea for a piece of software I just had which I might develop at some point if I ever get the time;
  • a dream I had, a building I saw, or the particularly vivid colours of a bird that flew past my window. (In practice this sort of entry often comes when transcribed from my pocket notebook, or via Simplenote on the iPhone.)

I use Notebook to make lists, plan and outline things. Sometimes I use it for research too, as it has good clipping capabilities, but its main value for me is that it makes it very easy to change the relationship between data items hierarchically (unsurprising given its history as an outliner). It can also accept any file type and allows you to edit it in-place, which Yojimbo just doesn’t do. I’ve tried organising projects using just Yojimbo but really, it didn’t work very well and just left me confused; it may be a great shoebox, but it’s still a shoebox, and keeping everything in a shoebox is messy no matter how many tag folders you make.

Anyway, to proceed to the meat of this post: one of the things CPN does very well is keep lists, and one of the types of list I keep in my Notebooks is an activity log, where I write down all the tiny details of my day in case I need to look them up later – IM conversations, little changes I make to a module, what just happened in a phone call. I almost never do, but sometimes it’s vital, and if I can very quickly enter a log entry I’m much more likely to do so. These aren’t really Yojimbo-type blobs to me, they’re timed sequential items in a list, with the list being the blob.

CPN doesn’t have any sort of “quick entry” panel, though, and it’s not Applescriptable. But there’s a way of using Launchbar to add quick text entries to lists like activity logs that now works properly with the final version of Launchbar 5.

Firstly create a page in a notebook for the activity log. Right-click on the page and select “Add a Clipping Service”. I have my log pages formatted to show the created date in the margin – you need to drag the red margin line across a bit to see the whole date and time (the drag bar appears a bit to the left of the icons by each node).

NoteBook001

Clipping services normally allow you to right-click on selected text and send that text straight to the page with the clipping service on it (you can have lots of these services) or send a PDF straight to the notebook from the print dialog, but in this case, the point is to use Launchbar to direct text via the service to the page.

To get Launchbar to recognise new services, you might need to quit and restart it, and then re-index (Cmd-0) – it doesn’t seem to always pick up on these things automatically – but after that it will stay there.

From then on, if you can find the “Clip to…” service with Launchbar…

LaunchBar001

…you can just press Space and then type your log entry…

LaunchBar002

…then press Return, and the entry will be saved to your page. Ctrl-Space, a few letters, Space, the entry, Return – a pretty simple way of adding an entry from any application.

Of course this isn’t something that no other note-taking app does by any means – lots of them have quick entry functions – but it fills a gap in Circus Ponies Notebook’s capability list that was very significant for me.

in Uncategorized | 744 Words | Comment

Simplenote Yojimbo Sync v0.31

It barely deserves a whole new post, but in case anyone is following this tag, I’ve added a version 0.31 of SNYS with a few new debugging checks in it now. I won’t put comments on here – please add any you have to the v0.3 post.

in Code | 46 Words

Simplenote Yojimbo Sync v0.3(1)

As the previous post suggest I’ve uploaded a new version of SNYS, 0.3. This has some more extensive logging options as some people are still having issues, but for those who aren’t, this version stays running and repeats the sync once per hour. You might wish to have it run on startup if you are that way inclined; I am.

Download from the dedicated page as usual.

Edit: Please can you post (a) the version of OS X you are using and (b) the version of Yojimbo you are using, when reporting a bug? I have a feeling that there may be some subtle Applescript differences involved here, and even if there aren’t, I’d like to eliminate that possibility.

Applescript and regular actions

I was wondering how I could have Simplenote Yojimbo Sync (henceforth, SNYS) running regularly, and thinking of all sorts of methods involving launchd, but actually it seems very simple to do with Applescript, which is where I should have looked in the first place.

From p76 of the Applescript Language Guide:

Stay-open script applications can perform periodic actions, even in the background, as long as the script application is running.

What I need therefore is an idle handler.

If a stay-open script application includes an idle handler, AppleScript sends the script application periodic idle commands—by default, every 30 seconds—allowing it to perform background tasks when it is not performing other actions.

So, I will put one of those in and it will run the sync periodically and everything will be happy. That should be straightforward.

Simplenote Yojimbo Sync v0.2

I’ve produced a new version of SNYS, 0.2, with the following changes:

  • Version checking at startup, with the option to download now or later, or skip a version.
  • Logging information to ~/Library/Logs/Simplenote Yojimbo Sync.log, which is the primary purpose of this version, to get some more debugging information for the people for whom it doesn’t seem to work. If you are one of these people, please leave a comment or get in touch with me on the Yojimbo or Simplenote API lists.
  • A couple of little coding improvements which probably aren’t very interesting to most people, but which you can see if you’d like to open the bundle and peer at the scripts.

There is also now a dedicated project page for this, which will always contain a link to the latest version, so you should go there to download it.

Planned future improvements

  • It’s been suggested that the app have an option to sync with the simpletext.ws website used by Writeroom as well as or instead of Simplenote. I think this is a good idea, as there is an API and also I do own a copy of Writeroom for the iPhone, and it shouldn’t be very hard to just change the method of finding notes, but I’ll make sure the basic sync structure works for everyone first.
  • I find it a bit counter-intuitive that deleting a note on one platform doesn’t delete it on the other one and in fact re-syncs it next time unless you delete it on both. However, again, until I’m sure the basic sync structure works for everyone, I’m going to keep it like that, because it minimises the chance of data loss. Once that’s sorted out, I plan to fix it so that deleting a note deletes it on both.
  • There needs to be an automatic sync option. At the moment you could use something like Lingon to run it, but that isn’t a very user-friendly method. Unfortunately, adding this feature is complicated by the fact that I have no idea how to do it. I’m sure it can’t be that hard.

Simplenote Yojimbo Sync v0.11

SimplenoteYojimboSync 2This is the first version of my syncing script between Simplenote and Yojimbo. (Well, v0.1 was the first, and was pretty much the same just without Growl support, but this is the first public version.)

If you would care to try it out, I would be delighted – please leave any comments, bug reports etc on this post. (Even just “works as expected” would be appreciated.)

Documentation and download

Edit: Of course, Sod’s Law, there was an installation bug in the initial version. I’ve now fixed this.