Scripting 23

We don’t yet have a proper 23 API ready yet, but there are a few ways to automate uploading many files to 23, especially on Mac OS X. We’ll have actual script examples up later, but here are a few pointers for the über-geeks out there:

You can create an Automator script in Mac OS X to select photos from your iPhoto Library, loop through the photos, and send each of them as an attachment to your 23 mail upload address.

You can also use AppleScript and the curl program, which is pre-installed on Mac, to log in and upload the photos. Here is an example of someone who did something similar for moving photos from iPhoto to Drupal.

Finally, until we have an API or a desktop application, we have a “simple upload interface”. The URL is http://www.23hq.com/23/extupload/simple-upload which takes these arguments:

  • username (required)
  • password (required)
  • file (required): Image file to upload
  • private_p: 1 for a private photo, 0 for a public one (defaults to private)
  • tags: Space-separated list of tags to apply
  • album_id: Numeric album ID

Here’s an example of how to upload, again using curl:

curl -F file=@image.jpg -F username=myuser -F password=secret -F private_p=0 http://www.23hq.com/23/extupload/simple-upload

Warning: This interface may disappear at any time.

Comments are closed.