Tagging using the Flickr API

June 11, 2007 at 1:46 am Leave a comment

My goal for the day was to geotag the mongage images I uploaded last week. Luckily each image title contains the latitude and longitude of the camera so I extracted the data from the title and added it back in the image tags.

Here is what I did:

  1. Got a Flickr API key and authentication code from the Flickr services website.
  2. Installed Beej’s Python Flickr API.
    1. Downloaded and extracted archive.
    2. Called python setup.py build.
    3. Called python setup.py install.
    4. Edited flickrapi.py to properly call firefox from the Windows command line (added double quotes around the URL in validateFrob).
  3. Wrote a python script to extract the title, parse it, and upload the new tags (I started with the test script Beej provides).
    1. It took a while to realize I needed to include both the method and auth_token parameters for the photo.setLocation and photo.addTags methods.
Advertisement

Entry filed under: information technology, programming, social software. Tags: .

Images from the Archive of Many Outdoor Scenes (AMOS) on flickr Montage of False Color Images from 165 Webcams

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


About me

I have been many things. Today, I am an assistant professor of computer science at the University of Kentucky. See my academic home page for more details.

Flickr Photos

Smooth

View from Mill Club 405

View from Mill Club 405

Rainbow Sunrise

Why can't I turn left?

More Photos

Follow

Get every new post delivered to your Inbox.