[spambayes-bugs] [ spambayes-Feature Requests-1081787 ] Adding the version only to sb_filter.py

SourceForge.net noreply at sourceforge.net
Thu Feb 3 04:15:46 CET 2005


Feature Requests item #1081787, was opened at 2004-12-09 12:10
Message generated for change (Comment added) made by matthew_vickers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702

Category: None
Group: None
>Status: Open
Priority: 5
Submitted By: Matthew Vickers (matthew_vickers)
Assigned to: Tony Meyer (anadelonbrin)
Summary: Adding the version only to sb_filter.py

Initial Comment:
Hi Folks,

Doing some integeration of Spambayes into our network
email gateway and I needed the version only to be
printed to the console i.e sb_filter -v.  I have
modified the source of sb_filter.py to include the
version commandline option.

Mabey someone else out there needs this small
functionality or it could be placed into the CVS tree.

def version():
  print >> sys.stderr, get_version_string("sb_filter"),
"with   engine %s" % get_version_string()
        sys.exit(1) 


and in the  main() function 

Added a "v" to the getopt arguments

opts, args = getopt.getopt(sys.argv[1:],
'hxd:p:nfvgstGSo:',
                               ['help', 'examples',
'option='])

Added the following into the else if statements
elif opt == '-v':
                version();


Regards all.

Matt.


----------------------------------------------------------------------

>Comment By: Matthew Vickers (matthew_vickers)
Date: 2005-02-03 14:15

Message:
Logged In: YES 
user_id=1174624

Hi anadelonbrin,

There was no "good" reason why we needed this except to
place the version in the email header.  I could have piped
the output through a filter but as most other command line
programs print a version with -v I thought that sb_filter
could use it.

Matt

----------------------------------------------------------------------

Comment By: Tony Meyer (anadelonbrin)
Date: 2005-02-03 13:19

Message:
Logged In: YES 
user_id=552329

sb_filter.py -h prints out the version information above the
usage information.  Is that not sufficient?  (piping the
output through some sort of filter could give just the version).

If there's some reason that just the version by itself would
be good, please let me know and I'll add it for 1.1.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702


More information about the Spambayes-bugs mailing list