Skip to content

Commit

Permalink
* Add -a (--all) option
Browse files Browse the repository at this point in the history
   - set all recommended options; same as -DmM
  • Loading branch information
tach committed Jun 8, 2009
1 parent a740b3a commit c1b861d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ rbphoto (0.2.1) unstable; urgency=low
RbPhoto::Import class
* Change load timing for gtk library
* Check GUI availability and fallback to CUI mode
* Add -a (--all) option
- set all recommended options; same as -DmM

-- Taku YASUI <[email protected]> Mon, 08 Jun 2009 22:38:28 +0900
-- Taku YASUI <[email protected]> Mon, 08 Jun 2009 22:47:16 +0900

rbphoto (0.2.0) unstable; urgency=low

Expand Down
11 changes: 10 additions & 1 deletion lib/rbphoto/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def self.help
not to duplicate by its exif data.
Options:
-a, --all set all recommended options; same as -DmM
-D, --datedir copy/move photos with datedir
-f, --force force to overwrite when move
-G, --no-gui disable GTK2+ graphical interface
Expand Down Expand Up @@ -183,6 +184,7 @@ def version
class Options < Hash
def initialize
parser = GetoptLong.new(
['--all', '-a', GetoptLong::NO_ARGUMENT],
['--datedir', '-D', GetoptLong::NO_ARGUMENT],
['--force', '-f', GetoptLong::NO_ARGUMENT],
['--no-gui', '-G', GetoptLong::NO_ARGUMENT],
Expand All @@ -197,7 +199,14 @@ def initialize
begin
parser.each do |name, arg|
arg = true if (arg == "")
self[name.sub(/^--/, '').gsub(/-/, '_').downcase] = arg
case arg
when '--all'
self['datedir'] = true
self['move'] = true
self['with_movie'] = true
else
self[name.sub(/^--/, '').gsub(/-/, '_').downcase] = arg
end
end
self['photographer'] ||= ENV['USER']
rescue
Expand Down

0 comments on commit c1b861d

Please sign in to comment.