flickr-folder¶ ↑
Uses the Flickr API (through flickr_fu) to fill a folder with images that match a specified search string and quantity.
Results can be filtered by passing a filter proc that will be invoked per photo, so that you can further filter your photos beyond what the Flickr API provides in its search syntax. For example, the API won’t let you search based on image resolution.
If you delete any photos and then run the update method again then it will automatically find new images that match your search conditions and your filter, and it will check them against a SQLite3 database to make sure that it never downloads the same photo twice.
Example usage¶ ↑
require 'rubygems' require 'flickr-folder' FlickrFolder.new({ :config => 'flickr.yml', :folder => { :path => 'photos', :number => 250, :minimum_resolution => 1000 }, :search => { :tags => 'miami beach', :sort => 'interestingness-desc' } }).update
API key¶ ↑
You need an API key from Flickr. Don’t worry, it’s quick and easy to get one. Just go to Flickr to create your key. Then create a YML file that looks like this:
key: "0923400YOUR0KEY0GOES0HERE00198" secret: "987YOUR0SECRET0HERE023"
Note on Patches/Pull Requests¶ ↑
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright¶ ↑
Copyright © 2010 Ryan Alyn Porter. See LICENSE for details.