diff --git a/debian/changelog b/debian/changelog index c8724ba..822c288 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 08 Jun 2009 22:38:28 +0900 + -- Taku YASUI Mon, 08 Jun 2009 22:47:16 +0900 rbphoto (0.2.0) unstable; urgency=low diff --git a/lib/rbphoto/import.rb b/lib/rbphoto/import.rb index 27ca052..384eb2c 100755 --- a/lib/rbphoto/import.rb +++ b/lib/rbphoto/import.rb @@ -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 @@ -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], @@ -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