From anadelonbrin at users.sourceforge.net Wed Feb 2 23:57:39 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Feb 2 23:57:46 2005 Subject: [Spambayes-checkins] website faq.txt,1.87,1.88 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30168 Modified Files: faq.txt Log Message: Add info about SpamBayes with an Athlon 64 and DSP. Thanks to Sean True for the info! Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** faq.txt 28 Jan 2005 02:08:26 -0000 1.87 --- faq.txt 2 Feb 2005 22:57:35 -0000 1.88 *************** *** 1506,1509 **** --- 1506,1517 ---- + After installing SpamBayes, Outlook crashes and then asks for the plug-in to be disabled. + ----------------------------------------------------------------------------------------- + + Are you using an Athlon 64 with DEP? There are issues with DEP and Outlook + with a SpamBayes-based plug-in. Listing Outlook as a safe application on + an Athlon 64 should "solve" the problem. + + Development =========== From anadelonbrin at users.sourceforge.net Mon Feb 7 23:57:40 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Mon Feb 7 23:57:43 2005 Subject: [Spambayes-checkins] spambayes/scripts sb_server.py,1.40,1.41 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14204/scripts Modified Files: sb_server.py Log Message: Move the ensureDir function to storage, as many scripts use it. Fix [ 1113863 ] sb_tray eats all cpu time When in non-verbose mode, connection errors are reported only once per hour. Index: sb_server.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_server.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** sb_server.py 3 Jan 2005 06:51:42 -0000 1.40 --- sb_server.py 7 Feb 2005 22:57:38 -0000 1.41 *************** *** 159,163 **** except socket.error, e: error = "Can't connect to %s:%d: %s" % (serverName, serverPort, e) ! print >>sys.stderr, error self.lineCallback('-ERR %s\r\n' % error) self.lineCallback('') # "The socket's been closed." --- 159,180 ---- except socket.error, e: error = "Can't connect to %s:%d: %s" % (serverName, serverPort, e) ! # Some people have their system setup to check mail very ! # frequently, but without being clever enough to check whether ! # the network is available. If we continually print the ! # "can't connect" error, we use up lots of CPU and disk space. ! # To avoid this, if not verbose only print each distinct error ! # once per hour. ! # See also: [ 1113863 ] sb_tray eats all cpu time ! now = time.time() ! then = time.time() - 3600 ! if error not in state.reported_errors or \ ! options["globals", "verbose"] or \ ! state.reported_errors[error] < then: ! print >>sys.stderr, error ! ! # Record this error in the list of ones we have seen this ! # session. ! state.reported_errors[error] = now ! self.lineCallback('-ERR %s\r\n' % error) self.lineCallback('') # "The socket's been closed." *************** *** 745,748 **** --- 762,768 ---- sys.exit() + # Remember reported errors. + self.reported_errors = {} + # Set up the statistics. self.totalSessions = 0 *************** *** 861,871 **** # so as not to clutter the filesystem. if not self.isTest: - def ensureDir(dirname): - try: - os.mkdir(dirname) - except OSError, e: - if e.errno != errno.EEXIST: - raise - # Create/open the Corpuses. Use small cache sizes to avoid hogging # lots of memory. --- 881,884 ---- *************** *** 873,877 **** hc = get_pathname_option("Storage", "ham_cache") uc = get_pathname_option("Storage", "unknown_cache") ! map(ensureDir, [sc, hc, uc]) if self.gzipCache: factory = GzipFileMessageFactory() --- 886,890 ---- hc = get_pathname_option("Storage", "ham_cache") uc = get_pathname_option("Storage", "unknown_cache") ! map(storage.ensureDir, [sc, hc, uc]) if self.gzipCache: factory = GzipFileMessageFactory() From anadelonbrin at users.sourceforge.net Tue Feb 8 00:13:50 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Feb 8 00:13:52 2005 Subject: [Spambayes-checkins] spambayes/spambayes storage.py,1.46,1.47 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18819/spambayes Modified Files: storage.py Log Message: Move the ensureDir function to storage, as many scripts use it. Index: storage.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/storage.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** storage.py 23 Dec 2004 04:32:57 -0000 1.46 --- storage.py 7 Feb 2005 23:13:47 -0000 1.47 *************** *** 1,3 **** ! #! /usr/bin/env python '''storage.py - Spambayes database management framework. --- 1,3 ---- ! ! /usr/bin/env python '''storage.py - Spambayes database management framework. *************** *** 39,44 **** To Do: - o Would Trainer.trainall really want to train with the whole corpus, - or just a random subset? o Suggestions? --- 39,42 ---- *************** *** 952,955 **** --- 950,964 ---- return nm, typ + def ensureDir(dirname): + """Ensure that the given directory exists - in other words, if it + does not exist, attempt to create it.""" + try: + os.mkdir(dirname) + if options["globals", "verbose"]: + print >>sys.stderr, "Creating directory", dirname + except OSError, e: + if e.errno != errno.EEXIST: + raise + if __name__ == '__main__': print >> sys.stderr, __doc__ From anadelonbrin at users.sourceforge.net Tue Feb 8 00:20:18 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Feb 8 00:20:22 2005 Subject: [Spambayes-checkins] spambayes/spambayes storage.py,1.47,1.48 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20945/spambayes Modified Files: storage.py Log Message: Somehow I managed to delete the initial # in the last checkin: restore. Index: storage.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/storage.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** storage.py 7 Feb 2005 23:13:47 -0000 1.47 --- storage.py 7 Feb 2005 23:20:16 -0000 1.48 *************** *** 1,3 **** ! ! /usr/bin/env python '''storage.py - Spambayes database management framework. --- 1,3 ---- ! #! /usr/bin/env python '''storage.py - Spambayes database management framework. From anadelonbrin at users.sourceforge.net Thu Feb 10 22:49:25 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Feb 10 22:49:30 2005 Subject: [Spambayes-checkins] website faq.txt,1.88,1.89 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2928 Modified Files: faq.txt Log Message: Fix mistake found by Jinn K. Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** faq.txt 2 Feb 2005 22:57:35 -0000 1.88 --- faq.txt 10 Feb 2005 21:48:59 -0000 1.89 *************** *** 1250,1255 **** then this probably means that port 8880, which SpamBayes is trying to use to present the web interface, is already taken on your machine. Try using ! ``sb_server.py -u 8881 -b`` (or ``sb_imapfilter.py -u 8881 -b``), or another ! port that you know is free and available on your machine. --- 1250,1255 ---- then this probably means that port 8880, which SpamBayes is trying to use to present the web interface, is already taken on your machine. Try using ! ``sb_server.py -u 8881 -b`` (or ``sb_imapfilter.py -o html_ui:port:8881 -b``), ! or another port that you know is free and available on your machine. From kpitt at users.sourceforge.net Fri Feb 11 22:06:26 2005 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Fri Feb 11 22:06:30 2005 Subject: [Spambayes-checkins] spambayes/Outlook2000 config.py,1.37,1.38 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29379/Outlook2000 Modified Files: config.py Log Message: Add a "Notifications" tab to SpamBayes Manager for configuring notification sounds. Index: config.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/config.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** config.py 3 Jan 2005 06:52:26 -0000 1.37 --- config.py 11 Feb 2005 21:05:49 -0000 1.38 *************** *** 291,295 **** assigned to each of the three classifications of messages. The good sound will be played if any good messages are received. The ! possible spam sound will be played if unsure messages are received, but no good messages. The spam sound will be played if all received messages are spam."""), --- 291,295 ---- assigned to each of the three classifications of messages. The good sound will be played if any good messages are received. The ! unsure sound will be played if unsure messages are received, but no good messages. The spam sound will be played if all received messages are spam."""), *************** *** 302,307 **** _("""Specifies the full path to a Windows sound file (WAV format) that will be played as notification that a possible spam message has been ! received. The possible spam notification sound will only be played ! if no good messages have been received."""), FILE_WITH_PATH, DO_NOT_RESTORE), ("notify_spam_sound", _("Sound file to play for spam messages"), "", --- 302,307 ---- _("""Specifies the full path to a Windows sound file (WAV format) that will be played as notification that a possible spam message has been ! received. The unsure notification sound will only be played if no ! good messages have been received."""), FILE_WITH_PATH, DO_NOT_RESTORE), ("notify_spam_sound", _("Sound file to play for spam messages"), "", *************** *** 309,313 **** will be played as notification that a spam message has been received. The spam notification sound will only be played if no ! good or possible spam messages have been received."""), FILE_WITH_PATH, DO_NOT_RESTORE), ("notify_accumulate_delay", _("The delay time to wait for additional received messages (in seconds)"), 10.0, --- 309,313 ---- will be played as notification that a spam message has been received. The spam notification sound will only be played if no ! good or unsure messages have been received."""), FILE_WITH_PATH, DO_NOT_RESTORE), ("notify_accumulate_delay", _("The delay time to wait for additional received messages (in seconds)"), 10.0, *************** *** 316,320 **** before the timer expires then the delay time is reset and SpamBayes continues to wait. If no new messages arrive within the delay time ! the SpamBayes will play the appropriate notification sound for the received messages."""), REAL, RESTORE), --- 316,320 ---- before the timer expires then the delay time is reset and SpamBayes continues to wait. If no new messages arrive within the delay time ! then SpamBayes will play the appropriate notification sound for the received messages."""), REAL, RESTORE), From kpitt at users.sourceforge.net Fri Feb 11 22:06:31 2005 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Fri Feb 11 22:06:33 2005 Subject: [Spambayes-checkins] spambayes/Outlook2000/dialogs win32struct.py, NONE, 1.1 dialog_map.py, 1.49, 1.50 opt_processors.py, 1.16, 1.17 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29379/Outlook2000/dialogs Modified Files: dialog_map.py opt_processors.py Added Files: win32struct.py Log Message: Add a "Notifications" tab to SpamBayes Manager for configuring notification sounds. --- NEW FILE: win32struct.py --- # This module provides helper classes for various structs (currently only # OPENFILENAME) that need to be passed to Win32 api functions as strings. # # The base cStruct class is a slightly modified version of an example posted # by Telion to the PythonCE mailing list. # http://mail.python.org/pipermail/pythonce/2002-October/000204.html import struct, array import win32gui class cStruct(object): # cStruct class uses following struct information. # (name, fs, initial_value) # # "name" is used for accessing value # "fs" is format string for that value (see struct module doc) # For lpstr, lpcstr, lpxxx, use 'P'. # "initial_value" default value def __init__(self, sd): self.sd = list(sd) self.nlst = [i[0] for i in sd] self.fs = "".join([i[1] for i in sd]) t = [i[2] for i in sd] self.data = struct.pack(self.fs, *t) def __setattr__(self, name, v): if name in ['sd', 'nlst', 'fs', 'data', 'ptr'] or name not in self.nlst: object.__setattr__(self, name, v) return t = list(struct.unpack(self.fs, self.data)) i = self.nlst.index(name) if i > -1: t[i] = v self.data = struct.pack(self.fs, *t) def __getattr__(self, name): t = struct.unpack(self.fs, self.data) i = self.nlst.index(name) if i > -1: return t[i] else: raise AttributeError def __str__(self): return self.data def dump(self): # use this to see the data t = struct.unpack(self.fs, self.data) ii = 0 for i in self.nlst: print i, "=", t[ii] ii += 1 print "fs =", self.fs return class OPENFILENAME(cStruct): _struct_def = ( \ ('lStructSize', 'L', 0), # size of struct (filled in by __init__) ('hwndOwner', 'P', 0), ('hInstance', 'P', 0), ('lpstrFilter', 'P', 0), # File type filter ('lpstrCustomFilter', 'P', 0), ('nMaxCustFilter', 'L', 0), ('nFilterIndex', 'L', 0), ('lpstrFile', 'P', 0), # Initial filename and filename buffer ('nMaxFile', 'L', 0), # Size of filename string (should be >= 256) ('lpstrFileTitle', 'P', 0), # (optional) base name receiving buffer ('nMaxFileTitle', 'L', 0), # max size of above ('lpstrInitialDir', 'P', 0), # (optional) initial directory ('lpstrTitle', 'P', 0), # Title of dialog ('Flags', 'L', 0), ('nFileOffset', 'H', 0), ('nFileExtension', 'H', 0), ('lpstrDefExt', 'P', 0), # default extension ('lCustData', 'l', 0), ('lpfnHook', 'P', 0), ('lpTemplateName', 'P', 0) ) def __init__(self, max_filename_len): cStruct.__init__(self, self._struct_def) self.lStructSize = struct.calcsize(self.fs) self.fn_buf = array.array("c", '\0'*max_filename_len) self.fn_buf_addr, self.fn_buf_len = self.fn_buf.buffer_info() self.lpstrFile = self.fn_buf_addr self.nMaxFile = self.fn_buf_len def setFilename(self, filename): win32gui.PySetString(self.fn_buf_addr, filename, self.fn_buf_len - 1) def getFilename(self): return win32gui.PyGetString(self.fn_buf_addr) def setTitle(self, title): if isinstance(title, unicode): title = title.encode("mbcs") self.title_buf = array.array("c", title+'\0') self.lpstrTitle = self.title_buf.buffer_info()[0] def setInitialDir(self, initialDir): if isinstance(initialDir, unicode): initialDir = initialDir.encode("mbcs") self.initialDir_buf = array.array("c", initialDir+'\0') self.lpstrInitialDir = self.initialDir_buf.buffer_info()[0] def setFilter(self, fileFilter): if isinstance(fileFilter, unicode): fileFilter = fileFilter.encode("mbcs") fileFilter = fileFilter.replace('|', '\0') + '\0' self.fileFilter_buf = array.array("c", fileFilter+'\0') self.lpstrFilter = self.fileFilter_buf.buffer_info()[0] Index: dialog_map.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** dialog_map.py 18 Jan 2005 18:23:10 -0000 1.49 --- dialog_map.py 11 Feb 2005 21:05:51 -0000 1.50 *************** *** 444,448 **** (TabProcessor, "IDC_TAB", """IDD_GENERAL IDD_FILTER IDD_TRAINING ! IDD_STATISTICS IDD_ADVANCED"""), (CommandButtonProcessor, "IDC_ABOUT_BTN", ShowAbout, ()), ), --- 444,449 ---- (TabProcessor, "IDC_TAB", """IDD_GENERAL IDD_FILTER IDD_TRAINING ! IDD_STATISTICS IDD_NOTIFICATIONS ! IDD_ADVANCED"""), (CommandButtonProcessor, "IDC_ABOUT_BTN", ShowAbout, ()), ), *************** *** 519,522 **** --- 520,539 ---- "IDC_LAST_RESET_DATE"), ), + "IDD_NOTIFICATIONS" : ( + (BoolButtonProcessor, "IDC_ENABLE_SOUNDS", "Notification.notify_sound_enabled", + """IDC_HAM_SOUND IDC_BROWSE_HAM_SOUND + IDC_UNSURE_SOUND IDC_BROWSE_UNSURE_SOUND + IDC_SPAM_SOUND IDC_BROWSE_SPAM_SOUND + IDC_ACCUMULATE_DELAY_SLIDER + IDC_ACCUMULATE_DELAY_TEXT"""), + (FilenameProcessor, "IDC_HAM_SOUND IDC_BROWSE_HAM_SOUND", + "Notification.notify_ham_sound", _("Sound Files (*.wav)|*.wav|All Files (*.*)|*.*")), + (FilenameProcessor, "IDC_UNSURE_SOUND IDC_BROWSE_UNSURE_SOUND", + "Notification.notify_unsure_sound", _("Sound Files (*.wav)|*.wav|All Files (*.*)|*.*")), + (FilenameProcessor, "IDC_SPAM_SOUND IDC_BROWSE_SPAM_SOUND", + "Notification.notify_spam_sound", _("Sound Files (*.wav)|*.wav|All Files (*.*)|*.*")), + (EditNumberProcessor, "IDC_ACCUMULATE_DELAY_TEXT IDC_ACCUMULATE_DELAY_SLIDER", + "Notification.notify_accumulate_delay", 0, 30, 20, 60), + ), "IDD_ADVANCED" : ( (BoolButtonProcessor, "IDC_BUT_TIMER_ENABLED", "Filter.timer_enabled", Index: opt_processors.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/opt_processors.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** opt_processors.py 28 Oct 2004 04:29:00 -0000 1.16 --- opt_processors.py 11 Feb 2005 21:05:54 -0000 1.17 *************** *** 252,255 **** --- 252,305 ---- self.SetOptionValue(val) + class FilenameProcessor(OptionControlProcessor): + def __init__(self, window, control_ids, option, file_filter="All Files|*.*"): + self.button_id = control_ids[1] + self.file_filter = file_filter + OptionControlProcessor.__init__(self, window, control_ids, option) + + def GetPopupHelpText(self, idFrom): + if idFrom == self.button_id: + return "Displays a dialog from which you can select a file." + return OptionControlProcessor.GetPopupHelpText(self, id) + + def DoBrowse(self): + from win32struct import OPENFILENAME + ofn = OPENFILENAME(512) + ofn.hwndOwner = self.window.hwnd + ofn.setFilter(self.file_filter) + ofn.setTitle(_("Browse for file")) + def_filename = self.GetOptionValue() + if (len(def_filename) > 0): + from os.path import basename + ofn.setInitialDir(basename(def_filename)) + ofn.setFilename(def_filename) + ofn.Flags = win32con.OFN_FILEMUSTEXIST + retval = win32gui.GetOpenFileName(str(ofn)) + if (retval == win32con.IDOK): + self.SetOptionValue(ofn.getFilename()) + self.UpdateControl_FromValue() + return True + return False + + def OnCommand(self, wparam, lparam): + id = win32api.LOWORD(wparam) + code = win32api.HIWORD(wparam) + if id == self.button_id: + self.DoBrowse() + elif code==win32con.EN_CHANGE: + self.UpdateValue_FromControl() + + def UpdateControl_FromValue(self): + win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0, + self.GetOptionValue()) + + def UpdateValue_FromControl(self): + buf_size = 256 + buf = win32gui.PyMakeBuffer(buf_size) + nchars = win32gui.SendMessage(self.GetControl(), win32con.WM_GETTEXT, + buf_size, buf) + str_val = buf[:nchars] + self.SetOptionValue(str_val) + # Folder IDs, and the "include_sub" option, if applicable. class FolderIDProcessor(OptionControlProcessor): From kpitt at users.sourceforge.net Fri Feb 11 22:06:47 2005 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Fri Feb 11 22:06:50 2005 Subject: [Spambayes-checkins] spambayes/Outlook2000/dialogs/resources dialogs.h, 1.26, 1.27 dialogs.rc, 1.51, 1.52 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29379/Outlook2000/dialogs/resources Modified Files: dialogs.h dialogs.rc Log Message: Add a "Notifications" tab to SpamBayes Manager for configuring notification sounds. Index: dialogs.h =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/dialogs.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** dialogs.h 11 Jan 2005 16:20:55 -0000 1.26 --- dialogs.h 11 Feb 2005 21:05:55 -0000 1.27 *************** *** 1,4 **** //{{NO_DEPENDENCIES}} ! // Microsoft Developer Studio generated include file. // Used by dialogs.rc // --- 1,4 ---- //{{NO_DEPENDENCIES}} ! // Microsoft Visual C++ generated include file. // Used by dialogs.rc // *************** *** 26,29 **** --- 26,30 ---- #define IDB_SBWIZLOGO 125 #define IDB_FOLDERS 127 + #define IDD_NOTIFICATIONS 128 #define IDC_PROGRESS 1000 #define IDC_PROGRESS_TEXT 1001 *************** *** 99,105 **** --- 100,116 ---- #define IDC_BUT_VIEW_LOG 1093 #define IDC_EDIT1 1094 + #define IDC_HAM_SOUND 1094 #define IDC_STATISTICS 1095 + #define IDC_UNSURE_SOUND 1095 #define IDC_BUT_RESET_STATS 1096 + #define IDC_SPAM_SOUND 1096 #define IDC_LAST_RESET_DATE 1097 + #define IDC_ENABLE_SOUNDS 1098 + #define IDC_ACCUMULATE_DELAY_SLIDER 1099 + #define IDC_ACCUMULATE_DELAY_TEXT 1100 + #define IDC_BROWSE_HAM_SOUND 1101 + #define IDC_BROWSE_UNSURE_SOUND 1102 + #define IDC_BROWSE_HAM_SOUND2 1103 + #define IDC_BROWSE_SPAM_SOUND 1103 // Next default values for new objects *************** *** 107,113 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 128 #define _APS_NEXT_COMMAND_VALUE 40001 ! #define _APS_NEXT_CONTROL_VALUE 1098 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 118,124 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 129 #define _APS_NEXT_COMMAND_VALUE 40001 ! #define _APS_NEXT_CONTROL_VALUE 1102 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: dialogs.rc =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/dialogs.rc,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** dialogs.rc 11 Jan 2005 16:20:55 -0000 1.51 --- dialogs.rc 11 Feb 2005 21:05:56 -0000 1.52 *************** *** 466,469 **** --- 466,494 ---- END + IDD_NOTIFICATIONS DIALOGEX 0, 0, 248, 257 + STYLE DS_SETFONT | WS_CHILD | WS_CAPTION + CAPTION "Notifications" + FONT 8, "Tahoma", 0, 0, 0x0 + BEGIN + GROUPBOX "New Mail Sounds",IDC_STATIC,7,3,241,229 + CONTROL "Enable new mail notification sounds",IDC_ENABLE_SOUNDS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,17,129,10 + LTEXT "Good sound:",IDC_STATIC,14,31,42,8 + EDITTEXT IDC_HAM_SOUND,14,40,174,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE_HAM_SOUND,192,40,50,14 + LTEXT "Unsure sound:",IDC_STATIC,14,58,48,8 + EDITTEXT IDC_UNSURE_SOUND,14,67,174,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE_UNSURE_SOUND,192,67,50,14 + LTEXT "Spam sound:",IDC_STATIC,14,85,42,8 + EDITTEXT IDC_SPAM_SOUND,14,94,174,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE_SPAM_SOUND,192,94,50,14 + LTEXT "Time to wait for additional messages:",IDC_STATIC,14, + 116,142,8 + CONTROL "",IDC_ACCUMULATE_DELAY_SLIDER,"msctls_trackbar32", + TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,127,148,22 + EDITTEXT IDC_ACCUMULATE_DELAY_TEXT,163,133,40,14,ES_AUTOHSCROLL + LTEXT "seconds",IDC_STATIC,205,136,28,8 + END + ///////////////////////////////////////////////////////////////////////////// *************** *** 597,600 **** --- 622,632 ---- BOTTOMMARGIN, 161 END + + IDD_NOTIFICATIONS, DIALOG + BEGIN + LEFTMARGIN, 7 + TOPMARGIN, 7 + BOTTOMMARGIN, 232 + END END #endif // APSTUDIO_INVOKED From anadelonbrin at users.sourceforge.net Sun Feb 13 22:53:48 2005 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Sun Feb 13 22:53:51 2005 Subject: [Spambayes-checkins] spambayes/contrib showclues.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11026/contrib Added Files: showclues.py Log Message: A little script that outputs to stdout a 'show clues' report like the one that Outlook creates, with the clues, tokens and message stream. --- NEW FILE: showclues.py --- #!/usr/bin/env python """Usage: showclues.py [options] [filenames] Options can one or more of: -h show usage and exit -d DBFILE use database in DBFILE -p PICKLEFILE use pickle (instead of database) in PICKLEFILE -m markup output with HTML -o section:option:value set [section, option] in the options database to value If no filenames are given on the command line, standard input will be processed as a single message. If one or more filenames are given on the command line, each will be processed according to the following rules: * If the filename is '-', standard input will be processed as a single message (may only be usefully given once). * If the filename starts with '+' it will be processed as an MH folder. * If the filename is a directory and it contains a subdirectory named 'cur', it will be processed as a Maildir. * If the filename is a directory and it contains a subdirectory named 'Mail', it will be processed as an MH Mailbox. * If the filename is a directory and not a Maildir nor an MH Mailbox, it will be processed as a Mailbox directory consisting of just .txt and .lorien files. * Otherwise, the filename is treated as a Unix-style mailbox (messages begin on a line starting with 'From '). """ # This module is part of the spambayes project, which is Copyright 2002-5 # The Python Software Foundation and is covered by the Python Software # Foundation license. __author__ = "Tony Meyer " __credits__ = "All the Spambayes folk." try: True, False except NameError: # Maintain compatibility with Python 2.2 True, False = 1, 0 import cgi import sys import getopt from spambayes import storage from spambayes import mboxutils from spambayes.classifier import Set from spambayes.Options import options from spambayes.tokenizer import tokenize def ShowClues(bayes, msg, as_html=False): if as_html: heading = "

", "

" tt = "", "" br = "
" pre = "
", "
" strong = "", "" escape = cgi.escape code = "", "" wrapper = "\n\n