Roundup Tracker - Issues

Message4182

Author bnordgren
Recipients bnordgren
Date 2010-10-25.16:58:26
Message-id <1288025908.97.0.0900930063082.issue2550677@psf.upfronthosting.co.za>
In-reply-to
I made a generic ClassInterceptor designed to be mixed in with Class or
FileClass at runtime as directed by schema.py (hence supporting all
backends). The two initial uses of this class are: 1] compression of
"content" (for messages primarily composed of text); and 2] suppression
of duplicate file entries (handy for people who have "image signatures"
setup in their email client.) It could also be used for encryption of
file content on disk.

The attached file contains the code. Feel free to post on the wiki, as
the wiki's permissions are still setup to prohibit postings by this
registered user. Also feel free to include in the standard distribution.
Use of the file in schema.py is as follows: 

from interceptor import interceptor_factory, GzipFileClass, UniqueFileClass

# Make a message file class which compresses the content before storage.
MessageFileClass =
interceptor_factory('MessageFileClass',GzipFileClass,FileClass)

# Make a file class which only stores unique files.
DataFileClass =
interceptor_factory('DataFileClass',UniqueFileClass,FileClass)
History
Date User Action Args
2010-10-25 16:58:29bnordgrensetrecipients: + bnordgren
2010-10-25 16:58:28bnordgrensetmessageid: <1288025908.97.0.0900930063082.issue2550677@psf.upfronthosting.co.za>
2010-10-25 16:58:28bnordgrenlinkissue2550677 messages
2010-10-25 16:58:28bnordgrencreate