Class: FlickrTools::Upload
- Defined in:
- lib/flickr-tools/upload.rb
Overview
Upload one or more image files to flickr.
USAGE: flickr-tools Upload jk path/to/image …
Flickr metadata is determined from the picture’s IPTC metadata: title - iptc/Headline description - iptc/Caption tags - iptc/Keywords minus IGNORE_KEYWORDS and PRIVACY_KEYWORDS privacy - privacy level is set to the given PRIVACY_KEYWORD if also the ‘privacy’ keyword is present in iptc keywords, public otherwise.
The keyword-to-tags treatment might seem strange, the reason is that Bibble uses hierarchical keyword trees which get flattened when written to IPTC meta data. That’s why my pictures have these abstract first level keywords like ‘place’ and ‘year’ which I don’t want to appear on flickr.
Constant Summary collapse
- IGNORE_KEYWORDS =
list of keywords not to be used as flickr tags
%w(place year privacy subject)
- PRIVACY_KEYWORDS =
list of keywords used to determine the flickr privacy level. Photos are public by default.
%w(private friends family friends_and_family)
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from FlickrTools::Command
Instance Method Details
#run ⇒ Object
31 32 33 34 35 |
# File 'lib/flickr-tools/upload.rb', line 31 def run @uploader = Flickr::Uploader.new flickr @args.each { |f| upload_file f } puts "done." end |