bin/oddb2xml in oddb2xml-1.6.2 vs bin/oddb2xml in oddb2xml-1.6.3

- old
+ new

@@ -11,10 +11,11 @@ def help <<EOS #$0 ver.#{Oddb2xml::VERSION} Usage: oddb2xml [option] + produced files are found under data -a T, --append=T Additional target. T, only 'nonpharma' is available. -c F, --compress=F Compress format F. {tar.gz|zip} -f F, --format=F File format F, default is xml. {xml|dat} If F is given, -o option is ignored. -i I, --include=I Include target option for 'dat' format. only 'ean14' is available. @@ -22,10 +23,14 @@ -o O, --option=O Optional output. O, only 'fi' is available. -p P, --price=P Price source (transfer.dat). P, only 'zurrose' is available. -t S, --tag-suffix=S XML tag suffix S. Default is none. [A-z0-9] If S is given, it is also used as prefix of filename. -x N, --context=N context N {product|address}. product is default. + + For debugging purposes + --skip-download skips downloading files it the file is already under data/downloads. + Downloaded files are saved under data/downloads -h, --help Show this help message. EOS end parser = OptionParser.new @@ -36,21 +41,22 @@ :compress_ext => nil, :format => :xml, :tag_suffix => nil, :debug => false, :ean14 => false, + :skip_download=> false, } parser.on('-a v', '--append v', /^nonpharma$/) {|v| opts[:nonpharma] = true } parser.on('-c v', '--compress v', /^tar\.gz|zip$/){|v| opts[:compress_ext] = v } parser.on('-f v', '--format v', /^xml|dat$/) {|v| opts[:format] = v.intern } parser.on('-o v', '--option v', /^fi$/) {|v| opts[:fi] = true } parser.on('-i v', '--include v', /^ean14$/) {|v| opts[:ean14] = true } parser.on('-t v', '--tag-suffix v', /^[A-z0-9]*$/i) {|v| opts[:tag_suffix] = v.upcase } parser.on('-x v', '--context v', /^addr(ess)*$/i){|v| opts[:address] = true } parser.on('-p v', '--price v', /^zurrose$/) {|v| opts[:price] = v.intern } -#parser.on('--debug') {|v| opts[:debug] = true } +parser.on('--skip-download') {|v| opts[:skip_download] = true } parser.on_tail('-h', '--help') { puts help; exit } args = ARGV.dup begin parser.parse!(args) @@ -79,8 +85,8 @@ MES warn message end ui.run rescue Interrupt - puts exit end +puts "#{Time.now}: #{__LINE__} done"; $stdout.sync