[Spambayes-checkins] spambayes README.txt, 1.47, 1.48 hammiefilter.py, 1.16, 1.17

Tony Meyer anadelonbrin at users.sourceforge.net
Thu May 1 22:05:14 EDT 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv26538

Modified Files:
	README.txt hammiefilter.py 
Log Message:
Update readme.txt to include imapfilter information, and to
reflect the recent Options.py changes.

Correct a comment in Outlook2000\export.py

Hopefully fix Options.py so that the temp file problem on
linux goes away (someone tell me if this is not the case)

Improve Options.py so that options use the same delimiter
as when read on export, where possible.

Renamed/moved several options, as discussed on the list.
For the moment, you can still refer to these by the old names
(no modules have been updated to use the new names yet).
The convert_config_file script should also convert these (but
this is as yet untested).  This should be the last major change of
Options.py necessary for some time (I hope!).

Patched hammiefilter so that it still uses the same default
filename for the storage database.  THIS WILL FAIL IF THE USER
HAS CHOSEN TO NAME THE FILE "hammie.db" AND OPTIONS.PY
DOES THE IMPORT OF THEIR CONFIG FILE.  To fix, undo the
patch, or simply put a full pathname in the config file.

Index: README.txt
===================================================================
RCS file: /cvsroot/spambayes/spambayes/README.txt,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** README.txt	11 Mar 2003 01:51:05 -0000	1.47
--- README.txt	2 May 2003 04:05:11 -0000	1.48
***************
*** 32,43 ****
      Uses ConfigParser to allow fiddling various aspects of the classifier,
      tokenizer, and test drivers.  Create a file named bayescustomize.ini to
!     alter the defaults; all options and their default values can be found
!     in the string "defaults" near the top of Options.py, which is really
!     an .ini file embedded in the module.  Modules wishing to control
!     aspects of their operation merely do
  
          from Options import options
  
!     near the start, and consult attributes of options.
  
      As an alternative to bayescustomize.ini, you can set the environment
--- 32,48 ----
      Uses ConfigParser to allow fiddling various aspects of the classifier,
      tokenizer, and test drivers.  Create a file named bayescustomize.ini to
!     alter the defaults.  Modules wishing to control aspects of their
!     operation merely do
  
          from Options import options
  
!     near the start, and consult attributes of options.  To see what options
!     are available, import Options.py and do
! 
!         print Options.options.display_full()
! 
!     This will print out a detailed description of each option, the allowed
!     values, and so on.  (You can pass in a section or section and option
!     name to display_full if you don't want the whole list).
  
      As an alternative to bayescustomize.ini, you can set the environment
***************
*** 114,117 ****
--- 119,129 ----
      A client for hammiesrv.
  
+ imapfilter.py
+     A spam-classifying and training application for use with IMAP servers.
+     You can specify folders that contain mail to train as ham/spam, and
+     folders that contain mail to classify, and the filter will do so.
+     Note that this is currently in very early development and not
+     recommended for production use.
+ 
  
  Test Driver Core
***************
*** 119,123 ****
  Tester.py
      A test-driver class that feeds streams of msgs to a classifier
!     instance, and keeps track of right/wrong percentages, and lists
      of false positives and false negatives.
  
--- 131,135 ----
  Tester.py
      A test-driver class that feeds streams of msgs to a classifier
!     instance, and keeps track of right/wrong percentages and lists
      of false positives and false negatives.
  

Index: hammiefilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/hammiefilter.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** hammiefilter.py	28 Apr 2003 00:36:03 -0000	1.16
--- hammiefilter.py	2 May 2003 04:05:12 -0000	1.17
***************
*** 97,100 ****
--- 97,109 ----
      def __init__(self):
          options = Options.options
+         # This is a bit of a hack to counter the default for
+         # persistent_storage_file changing from ~/.hammiedb to hammie.db
+         # This will work unless a user:
+         #   * had hammie.db as their value for persistent_storage_file, and
+         #   * their config file was loaded by Options.py.
+         if options["hammiefilter", "persistent_storage_file"] == \
+            options.default("Storage", "persistent_storage_file"):
+             options["hammiefilter", "persistent_storage_file"] = \
+                                     "~/.hammiedb"
          options.merge_files(['/etc/hammierc',
                              os.path.expanduser('~/.hammierc')])





More information about the Spambayes-checkins mailing list