This gem is a little tool for pulling infomation from boston bigpicture, which is a news site with beautiful photos. The reutrn info format is a data sructure looks like:
bp_info{
:total_desc => "description for the whole theme of all photos"
:image_list => [
image{
:url => url
:desc => "description for the single photo"
}
]#list of photos
}
Add this line to your application's Gemfile:
gem 'little_fish'
And then execute:
$ bundle
Or install it yourself as:
$ gem install little_fish
There are two use scenarios
-
command line application usually you can just type:
little_fish
for downdoading:
little_fish -d
more details plz dont be hesitated to call for help
little_fish --help
- usage in your application
require 'little_fish'
fisher = LittleFish::Fisher.new do |f|
f.last_nth_item = 0 #0 for latest post, and 1 means the last one, 2 means the one before last post, eg.
f.dumpfile = 'temp.txt'#if not assigned, filename will be named by datetime. if assigned 'no', 'none', or 'false', it wont dump out any file
end
info = fisher.pull
urls = info[:images].map{|e| e[:url]} #to get the urls
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request