sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit ccdd089f46cf38f32fb1d36e2bf78daf7d589b15
parent 74ccfaadfe9c0e19a3dd5fa8daf9e108dfb10db2
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Mon,  2 Apr 2007 05:12:40 +0000

improved help text and now all args must be uris (no more mbox defaulting)

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@367 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M bin/sup-add | 10 ++++------
M bin/sup-sync | 13 +++++--------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/bin/sup-add b/bin/sup-add
@@ -12,14 +12,13 @@ $opts = Trollop::options do
 Adds a source to the Sup source list.
 
 Usage:
-  sup-add [options] <source>+
+  sup-add [options] <source uri>+
 
-where <source>+ is one or more sources.
+where <source uri>+ is one or more source URIs.
 
 For mbox files on local disk, use the form:
+    mbox:<path to mbox file>, or
     mbox://<path to mbox file>
-or simply
-    <path to mbox file>
 
 For mbox files on remote machines, use the form:
     mbox+ssh://<machine name>/<path to mbox file>
@@ -31,6 +30,7 @@ For IMAP folders, use the form (note no username or password!):
     imaps://<machine name>/<folder> # secure, arbitrary folder 
 
 For Maildir folders, use the form:
+    maildir:<path to Maildir directory>; or
     maildir://<path to Maildir directory>
 
 Options are:
@@ -80,8 +80,6 @@ index = Redwood::Index.new
 index.load
 
 ARGV.each do |uri|
-  uri = "mbox://#{uri}" unless uri =~ %r!://!
-
   if !$opts[:force_new] && index.source_for(uri) 
     say "Already know about #{uri}; skipping."
     next
diff --git a/bin/sup-sync b/bin/sup-sync
@@ -43,14 +43,8 @@ Usage:
   sup-sync [options] <source>*
 
 where <source>* is zero or more source URIs. If no sources are given,
-sync from all usual sources.
-
-Supported source URIs:
-  mbox://<path to mbox file>,      e.g. mbox:///var/spool/mail/me
-  maildir://<path to maildir dir>, e.g. maildir:///home/me/Maildir
-  mbox+ssh://<machine>/<path to mbox file>
-  imap://<machine>/[<folder>]
-  imaps://<machine>/[<folder>]
+sync from all usual sources. All supported source URI schemes can
+be seen by running "sup-add --help".
 
 Options controlling WHICH messages sup-sync operates on:
 EOS
@@ -199,6 +193,9 @@ begin
     $stderr.puts "Scanned #{num_scanned}, added #{num_added}, updated #{num_updated} messages from #{source}."
     $stderr.puts "Restored state on #{num_restored} (#{100.0 * num_restored / num_scanned}%) messages." if num_restored > 0
   end
+rescue Exception => e
+  File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace }
+  raise
 ensure
   index.save
   Redwood::finish