From 16ec9aba7e94e628f22bcaeb3ecdd7916f3a3df5 Mon Sep 17 00:00:00 2001 From: lnu Date: Thu, 31 Mar 2005 22:08:32 +0000 Subject: first import git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@5 f70e237a-67f3-0310-a06c-d2b8a7116972 --- bin/feed2imap | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/feed2imap (limited to 'bin/feed2imap') diff --git a/bin/feed2imap b/bin/feed2imap new file mode 100755 index 0000000..e0a668f --- /dev/null +++ b/bin/feed2imap @@ -0,0 +1,35 @@ +#!/usr/bin/ruby -w + +$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') + +require 'feed2imap/feed2imap' +require 'optparse' + +verbose = false +version = false +cacherebuild = false +configf = ENV['HOME'] + '/.feed2imaprc' +opts = OptionParser::new do |opts| + opts.banner = "Usage: ./feed2imap.rb [options]" + opts.separator "" + opts.separator "Options:" + opts.on("-v", "--verbose", "Verbose mode") do |v| + verbose = true + 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 cache, as if it was already read.") do |c| + cacherebuild = true + end + opts.on("-f", "--config ", "Select alternate config file") do |f| + configf = f + end +end +opts.parse!(ARGV) + +if version + puts "Feed2Imap v.#{F2I_VERSION}" +else + Feed2Imap::new(verbose, cacherebuild, configf) +end -- cgit v1.2.3-54-g00ecf