[Spambayes-checkins] spambayes hammiefilter.py,1.7,1.8
Skip Montanaro
montanaro at users.sourceforge.net
Wed Jan 15 14:41:17 EST 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv27803
Modified Files:
hammiefilter.py
Log Message:
minor tweak to the usage message.
add --help as a valid option for people used to GNU long options
Index: hammiefilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/hammiefilter.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** hammiefilter.py 15 Jan 2003 21:23:04 -0000 1.7
--- hammiefilter.py 15 Jan 2003 22:41:15 -0000 1.8
***************
*** 17,20 ****
--- 17,29 ----
"""Usage: %(program)s [OPTION]
+ A hammie front-end to make the simple stuff simple. The intent is to call
+ this from procmail and its ilk like so:
+
+ :0 fw
+ | hammiefilter.py
+
+ Then, you can set up your MUA to pipe ham and spam to it, one at a time, by
+ calling it with either the -g or -s options, respectively.
+
Where [OPTION] is one of:
-h
***************
*** 104,110 ****
h = HammieFilter()
action = h.filter
! opts, args = getopt.getopt(sys.argv[1:], 'hngsGS')
for opt, arg in opts:
! if opt == '-h':
usage(0)
elif opt == '-g':
--- 113,119 ----
h = HammieFilter()
action = h.filter
! opts, args = getopt.getopt(sys.argv[1:], 'hngsGS', ['help'])
for opt, arg in opts:
! if opt in ('-h', '--help'):
usage(0)
elif opt == '-g':
More information about the Spambayes-checkins
mailing list