You are here

Backup your public Flickr photo metadata to MongoDB using backupPublicPhotoMetadataByDateAndUser

Submitted by Roland on Mon, 2012-02-27 01:19

If you know how to run MongoDB and ruby on your computer or your server, then backupPublicPhotoMetadataByDateAndUser.rb is a simple Ruby script to backup your Flickr metadata for yours (or anybody else's) Flickr public photos for a given time period. Simple (it doesn't replicate flickr's richness nearly as comprehensively as Aaron's parallel flickr) but effective because then you can with very very simple programming use the MongoDB query language to do useful Flickr queries such as:

1. give me all the photos in gastown

2. give me the square 75x75url of all photos in Vancouver tagged "yellow"

3. give me all the photos geo-tagged in the city of Vancouver taken in 2011 during the morning rush hour (e.g. if you wanted to do Eric Fisher-like  maps)

HOW TO RUN IT:

  1. Start up MongoDB and create some indexes: /Applications/mongodb-osx-x86_64-2.0.2/bin/mongo
    1. > db.photos.ensureIndex({id:1});
      > db.photos.ensureIndex({datetaken:1});
      > db.photos.ensureIndex({dateupload:1});
      > db.photos.ensureIndex({lastupdate:1});
  2. Set Environment variables to point to your MongoDB and your flickr api key and the userid e.g.
    1. export MONGO_PORT=27017
    2. export MONGO_HOST=127.0.0.1
    3. export FLICKR_DB=rtflickr # your flickr database name in Mongo DB
    4. export FLICKR_USER=yourfunnyFlickruserIdendinging@01
    5. create a flickr.conf file like this:
      1. Roland-Tanglaos-MacBook-Pro-2:mongoflickrbackup rolandtanglao$ cat flickr.conf
        api_key = a3b9eeatbeefdecafbad
  3. specify time and date to backup e.g. to backup your 2009 public photos:
    1. ./backupPublicPhotoMetadataByDateAndUser.rb 2009 1 1 2009 12 31  >backup.2009.stdout.txt 2>backup.2009.stderr.txt

Comments

Herndon maids Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!

Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling “nobody wants to be first”. coco palms

You contain a physical road of book also appear to own so plenty craze about this publication. You retain put it in a road that everyone can conceive. Chelsea Reed

I acknowledged what you have done here. I am continually looking for enlightening data like this. Much obliged concerning imparting to us.Steven

Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!

This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place.E2020 teacher Login

Generally I do not read article on blogs, however I wish to say that this write-up very forced me to check out and do so! Your writing taste has been amazed me. Thanks, very great post. homepage

'Though Brussels has ramped up efforts to promote awareness of trans and intersex discrimination, I would like to see things speed up.' EvoWPThemes

I have been exploring this topic for a some long time. You have offered great information in your post and some things I have not seen in other content I have read by my friends.         

forbes

<p>I just came across your blog and reading your beautiful words. I thought I would leave my first comment but I don&rsquo;t know what to say except that I have enjoyed reading.</p><table border="0" cellpadding="0" cellspacing="0" width="562"><colgroup><col width="562" /></colgroup><tbody><tr height="20"><td height="20" style="height:15.0pt;width:422pt" width="562">&lt;a href=&quot;https://www.rebelmouse.com/vitamincserum/&quot;&gt;vitamin c for face&lt;/a&gt;</td></tr></tbody></table><p>&nbsp;</p>

I just came across your blog and reading your beautiful words. I thought I would leave my first comment but I don’t know what to say except that I have enjoyed reading.richard crenian information

Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. san diego seo services

Well the first I noticed in Google Analytics. I see it almost died. I'm thinking of finally moving to a cloud news reader, I've been using NewsFire for years and before that I used Opera for my RSS feeds. NewsFire uses so much damn memory and it isn't being actively developed. I do a lot of reading of news on my iPhone using Pulse S & B Fence Company

Well the first I noticed in Google Analytics. I see it almost died. I'm thinking of finally moving to a cloud news reader, I've been using NewsFire for years and before that I used Opera for my RSS feeds. NewsFire uses so much damn memory and it isn't being actively developed. I do a lot of reading of news on my iPhone using Pulse schwarzkopf palette

When I first visited your blog, I liked the concept of your blog posts. It is very well portrayed as well as depicted. www.sepe.es

I wanted to thank you for this great read!! I definitely enjoyed every little bit of it . I have you bookmarked to check out new stuff on your post.. book a room medina

Is this a paid theme or did you modify it yourself? Anyway keep up the nice quality writing, it is rare to see a great blog like this one nowadays. rosleyn

The discussion generated dozens of Facebook comments from community members with ideas, but the city declined to pursue the matter because of environmental concerns.cavedog fitness

Pages

Add new comment