"Fossies" - the Fresh Open Source Software Archive

Member "roundup-2.0.0/share/roundup/templates/jinja2/detectors/messagesummary.py" (26 Aug 2019, 490 Bytes) of package /linux/www/roundup-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "messagesummary.py": 1.6.1_vs_2.0.0.

    1 from roundup.mailgw import parseContent
    2 
    3 def summarygenerator(db, cl, nodeid, newvalues):
    4     ''' If the message doesn't have a summary, make one for it.
    5     '''
    6     if 'summary' in newvalues or 'content' not in newvalues:
    7         return
    8 
    9     summary, content = parseContent(newvalues['content'], config=db.config)
   10     newvalues['summary'] = summary
   11 
   12 
   13 def init(db):
   14     # fire before changes are made
   15     db.msg.audit('create', summarygenerator)
   16 
   17 # vim: set filetype=python ts=4 sw=4 et si