bin/propre in propre-0.0.7 vs bin/propre in propre-0.0.8

- old
+ new

@@ -8,18 +8,18 @@ options = {} OptionParser.new do |opt| opt.banner = "Usage: #{ File.basename($0) } [OPTION]... SOURCE..." - opt.on('-R', '--recursive', 'Run recursively') do |v| - options[:recursive] = v - end - opt.on('-i', '--interactive', 'Run interactively') do |v| options[:interactive] = v end + opt.on('-R', '--recursive', 'Run recursively') do |v| + options[:recursive] = v + end + opt.on('-V', '--video-only', 'Search for video files only') do |v| options[:videonly] = v end opt.on('-s', '--sanitize', 'Sanitize filename before search') do |v| @@ -28,22 +28,35 @@ opt.on('-d', '--dotfile', 'Don\'t ignore .dotfile') do |v| options[:dotfile] = v end + opt.on_tail("-v", "--version", "Show version information about this program and quit.") do + puts "#{Propre} - v#{Propre::VERSION}" + exit + end + + opt.on_tail("-h", "--help", "--usage", "Show this help message and quit.") do |v| + puts opt.help + exit + end + options[:help] = opt.help + end.parse! def main(options) if ARGV.size < 1 puts options[:help] else propre = Propre.new(options) if File.directory?(ARGV[0]) + puts "Searching for movies title..." propre.crawlDirectory(ARGV[0]) end if File.file?(ARGV[0]) + puts "Searching for movie title..." propre.searchMovieFromFile(ARGV[0]) end end end \ No newline at end of file