]> code.delx.au - offlineimap/commitdiff
/head: changeset 110
authorjgoerzen <jgoerzen>
Fri, 12 Jul 2002 04:08:27 +0000 (05:08 +0100)
committerjgoerzen <jgoerzen>
Fri, 12 Jul 2002 04:08:27 +0000 (05:08 +0100)
Initial documentation added; more updates

head/offlineimap.1 [new file with mode: 0644]
head/offlineimap.conf
head/offlineimap.py
head/offlineimap/ui/__init__.py
head/offlineimap/ui/detector.py

diff --git a/head/offlineimap.1 b/head/offlineimap.1
new file mode 100644 (file)
index 0000000..bf5cfae
--- /dev/null
@@ -0,0 +1,127 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OFFLINEIMAP 1 "July 11, 2002" "quux.org" "OfflineIMAP manual"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+OfflineIMAP \- IMAP/Maildir synchronization and reader support
+.SH SYNOPSIS
+.B offlineimap
+[
+.BI -1
+]
+[
+.BI -a \ accountlist
+]
+[
+.BI -c \ configfile
+]
+.br
+[
+.BI -d
+]
+[
+.BI -u " interface"
+]
+
+.\".RI [ -c \ foo ]
+.\".RI [ options ] " files" ...
+.br
+.B offlineimap
+.B -h
+.\".RI [ options ] " files" ...
+.SH DESCRIPTION
+.B OfflineIMAP
+is a tool to simplify your e-mail reading.  With 
+.B OfflineIMAP,
+you can read the same mailbox from multiple computers.  You get a
+current copy of your messages on each computer, and changes you make
+one place will be visible on all other systems.  For instance, you can
+delete a message on your home computer, and it will appear deleted on
+your work computer as well.
+.B OfflineIMAP
+is also useful if you want to use a mail reader that does not have
+IMAP support, has poor IMAP support, or does not provide disconnected
+operation.
+.PP
+.B OfflineIMAP
+is
+.I FAST;
+it synchronizes my two accounts with over 50 folders in 3 seconds.
+Other similar tools might take over a minute, and achieve a
+less-reliable result.  Some mail readers can take over 10 minutes to
+do the same thing, and some don't even support it at all.  Unlike
+other mail tools,
+.B OfflineIMAP
+features a multi-threaded synchronization algorithm that can
+dramatically speed up performance in many situations by synchronizing
+several different things simultaneously.
+.PP
+.B OfflineIMAP
+is
+.I FLEXIBLE;
+you can customize which folders are synced via regular expressions, lists, or
+Python expressions; a versatile and comprehensive configuration file
+is used to control behavior; two user interfaces are built-in;
+fine-tuning of synchronization performance is possible; internal or
+external automation is supported; SSL and PREAUTH tunnels are both
+supported; offline (or "unplugged") reading is supported; and
+esoteric IMAP features are supported to ensure compatibility with the
+widest variety of IMAP servers.
+.PP
+.B OfflineIMAP
+is
+.I SAFE;
+it uses an algorithm designed to prevent mail loss at all costs.
+Because of the design of this algorithm, even programming errors
+should not result in loss of mail.  I am so confident in the algorithm
+that I use my own personal and work accounts for testing of
+.B OfflineIMAP
+pre-release, development, and beta releases.
+.PP
+This manual page documents briefly the
+.B offlineimap
+and
+.B bar
+commands.
+This manual page was written for the Debian distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNU Info format; see below.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBofflineimap\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+This manual page was written by John Goerzen <jgoerzen@complete.org>,
+for the Debian GNU/Linux system (but may be used by others).
index d10ecb57c2d9102154aa460d546b2430445859b8..31e5d6905d44d429b94223bc10d8fc1f45452843 100644 (file)
@@ -54,12 +54,12 @@ maxsyncaccounts = 1
 # fails, the second, and so forth.
 #
 # The pre-defined options are:
-# Tk.TKUI -- A graphical interface
+# Tk.TkUI -- A graphical interface
 # TTY.TTYUI -- a text-based (terminal) interface
 #
 # You can override this with a command-line option -u.
 
-ui = Tk.TKUI, TTY.TTYUI
+ui = Tk.TkUI, TTY.TTYUI
 
 
 ##################################################
index 2af32c6b1cba9e90225786ac72ecfd137a1d3616..f2c9367a6cf890a3c51470804db402faf78a277e 100644 (file)
@@ -23,13 +23,10 @@ import re, os, os.path, offlineimap, sys
 from ConfigParser import ConfigParser
 from threading import *
 
+
 if '-d' in sys.argv:
     imaplib.Debug = 5
 
-ui = offlineimap.ui.TTY.TTYUI()
-#ui = offlineimap.ui.Tk.TkUI()
-ui.init_banner()
-
 config = ConfigParser()
 configfilename = os.path.expanduser("~/.offlineimaprc")
 if not os.path.exists(configfilename):
@@ -38,6 +35,10 @@ if not os.path.exists(configfilename):
     
 config.read(configfilename)
 
+ui = offlineimap.ui.detector.findUI(config)
+ui.init_banner()
+
+
 metadatadir = os.path.expanduser(config.get("general", "metadata"))
 if not os.path.exists(metadatadir):
     os.mkdir(metadatadir, 0700)
index 72a133c5c10252829f3f708c7f6628a5367da749..13cb3c8b0639373d53ac75ea97a5ca05184a271e 100644 (file)
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-import TTY, UIBase, detector
+import TTY, UIBase
 availableUIs = {'TTY': TTY, 'UIBase': UIBase}
 try:
     import Tkinter
@@ -27,3 +27,4 @@ else:
     import Tk
     availableUIs['Tk'] = Tk
 
+import detector
index ecc98c69805bbdcf28871b09dc7d0173b348c188..e29fcd8d90dc77f4f878b82b42e8b6d2045df52f 100644 (file)
@@ -20,19 +20,21 @@ from offlineimap.ui import *
 import sys
 
 def findUI(config):
-    uistrlist = ['Tk.TKUI', 'TTY.TTYUI']
+    uistrlist = ['Tk.TkUI', 'TTY.TTYUI']
     if config.has_option("general", "ui"):
         uistrlist = config.get("general", "ui").replace(" ", "").split(",")
     for uistr in uistrlist:
         uimod = getUImod(uistr)
-        if uimod and uimod.isusable():
-            return uimod
+        if uimod:
+            uiinstance = uimod()
+            if uiinstance.isusable():
+                return uiinstance
     sys.stderr.write("ERROR: No UIs were found usable!\n")
     sys.exit(200)
     
 def getUImod(uistr):
     try:
         uimod = eval(uistr)
-    except AttributeError, NameError:
+    except (AttributeError, NameError):
         return None
     return uimod