• R/O
  • SSH
  • HTTPS

rbphoto: Commit


Commit MetaInfo

Revisão57 (tree)
Hora2009-06-08 22:48:16
Autortach

Mensagem de Log

  • Add -a (--all) option
    - set all recommended options; same as -DmM

Mudança Sumário

Diff

--- rbphoto/trunk/lib/rbphoto/import.rb (revision 56)
+++ rbphoto/trunk/lib/rbphoto/import.rb (revision 57)
@@ -46,6 +46,7 @@
4646 not to duplicate by its exif data.
4747
4848 Options:
49+ -a, --all set all recommended options; same as -DmM
4950 -D, --datedir copy/move photos with datedir
5051 -f, --force force to overwrite when move
5152 -G, --no-gui disable GTK2+ graphical interface
@@ -183,6 +184,7 @@
183184 class Options < Hash
184185 def initialize
185186 parser = GetoptLong.new(
187+ ['--all', '-a', GetoptLong::NO_ARGUMENT],
186188 ['--datedir', '-D', GetoptLong::NO_ARGUMENT],
187189 ['--force', '-f', GetoptLong::NO_ARGUMENT],
188190 ['--no-gui', '-G', GetoptLong::NO_ARGUMENT],
@@ -197,7 +199,14 @@
197199 begin
198200 parser.each do |name, arg|
199201 arg = true if (arg == "")
200- self[name.sub(/^--/, '').gsub(/-/, '_').downcase] = arg
202+ case arg
203+ when '--all'
204+ self['datedir'] = true
205+ self['move'] = true
206+ self['with_movie'] = true
207+ else
208+ self[name.sub(/^--/, '').gsub(/-/, '_').downcase] = arg
209+ end
201210 end
202211 self['photographer'] ||= ENV['USER']
203212 rescue
Show on old repository browser