Sha256: 8720e54c575438b63e3fa023558645f23b2562f68d1f39ab975eb0f7ec29466c
Contents?: true
Size: 1.21 KB
Versions: 7
Compression:
Stored size: 1.21 KB
Contents
#!/usr/bin/ruby $:.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'feed2imap/feed2imap' require 'optparse' verbose = false version = false cacherebuild = false configf = ENV['HOME'] + '/.feed2imaprc' progname = File::basename($PROGRAM_NAME) opts = OptionParser::new do |opts| opts.program_name = progname opts.banner = "Usage: #{progname} [options]" opts.separator "" opts.separator "Options:" opts.on("-v", "--verbose", "Verbose mode") do |v| verbose = true end opts.on("-d", "--debug", "Debug mode") do |v| verbose = :debug end opts.on("-V", "--version", "Display Feed2Imap version") do |v| version = true end opts.on("-c", "--rebuild-cache", "Cache rebuilding run : will fetch everything and add to cache, without uploading to the IMAP server. Useful if your cache file was lost, and you don't want to re-read all the items.") do |c| cacherebuild = true end opts.on("-f", "--config <file>", "Select alternate config file") do |f| configf = f end end begin opts.parse!(ARGV) rescue OptionParser::ParseError => pe opts.warn pe puts opts exit 1 end if version puts "Feed2Imap v.#{Feed2Imap::VERSION}" else Feed2Imap::new(verbose, cacherebuild, configf) end
Version data entries
7 entries across 7 versions & 1 rubygems