gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump rss.py model.py check.py conf.py
Date Thu, 11 Sep 2003 21:11:42 GMT
ajack       2003/09/11 14:11:42

  Modified:    python/gump rss.py model.py check.py conf.py
  Log:
  Some RSS improvements (1) site URL (not only to cvs.apache) (2) prefix -> RSS title (3)
more details [previous state, 'annotations']
  
  Revision  Changes    Path
  1.7       +26 -15    jakarta-gump/python/gump/rss.py
  
  Index: rss.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/rss.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- rss.py	10 Sep 2003 21:43:54 -0000	1.6
  +++ rss.py	11 Sep 2003 21:11:42 -0000	1.7
  @@ -65,13 +65,12 @@
   import os
   import time
   
  +from gump import gumpSafeName
   from gump.context import *
   from gump.statistics import StatisticsDB,ProjectStatistics
   
   ###############################################################################
   
  -# Where to find the historical data
  -gumproot='http://cvs.apache.org/builds/gump/'
   
   # Local time zone, in offset from GMT
   TZ='%+.2d:00' % (-time.timezone/3600)
  @@ -84,17 +83,17 @@
       
       db=StatisticsDB()       
               
  -    rssFile=os.path.normpath(os.path.join(workspace.logdir,'index.rss'))
  +    rssFile=os.path.abspath(os.path.join(workspace.logdir,'index.rss'))
       
       gumprss = open(rssFile,'w')
  -    gumprss.write("""<rss version="2.0"
  +    gumprss.write(("""<rss version="2.0"
     xmlns:admin="http://webns.net/mvcb/" 
     xmlns:dc="http://purl.org/dc/elements/1.1/" 
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
   
     <channel>
  -    <title>Gump</title>
  +    <title>Jakarta Gump : %s</title>
       <link>http://jakarta.apache.org/gump/</link>
       <description>Life is like a box of chocolates</description>
   
  @@ -102,9 +101,9 @@
       <admin:errorReportsTo rdf:resource="mailto:gump@jakarta.apache.org"/>
   
       <sy:updateFrequency>1</sy:updateFrequency>
  -    <sy:updatePeriod>daily</sy:updatePeriod>""")
  -    
  -    
  +    <sy:updatePeriod>daily</sy:updatePeriod>""") % \
  +        ( workspace.prefix ) )
  +        
       for mctxt in context:
           if not STATUS_SUCCESS == mctxt.status:
               if Module.list.has_key(mctxt.name):
  @@ -121,12 +120,24 @@
                               
                           log.info("RSS written for " + pctxt.name); 
       
  -                        link = gumproot + '/' + mctxt.name + '/' + pctxt.name + 'index.html'
                      
  +                        link = workspace.logurl + '/' + gumpSafeName(mctxt.name) + '/'
+ gumpSafeName(pctxt.name) + '.html'                       
                           datestr=time.strftime('%Y-%m-%d')
                           timestr=time.strftime('%H%M')
                       
  -                        content='Project ' + pctxt.name + ' : ' + stateName(pctxt.status)
  -                    
  +                        content='Project ' + pctxt.name \
  +                                + ' : ' \
  +                                + stateName(pctxt.status) \
  +                                + ' ' \
  +                                + reasonString(pctxt.reason) \
  +                                + "\n\n"
  +                        
  +                        content += 'Previous state: ' \
  +                                + stateName(s.previousState)  \
  +                                + "\n\n"
  +                     
  +                        for note in pctxt.annotations:
  +                            content += ("   - " + str(note) + "\n")
  +                        
                           # write out the item to the rss feed
                           gumprss.write("""
                               <item>
  @@ -148,7 +159,7 @@
       """)
       gumprss.close()                                 
       
  -    log.info("RSS Newsfeed written" + rssFile);           
  +    log.info("RSS Newsfeed written to : " + rssFile);           
       
                
   
  
  
  
  1.16      +4 -3      jakarta-gump/python/gump/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- model.py	5 Sep 2003 05:25:54 -0000	1.15
  +++ model.py	11 Sep 2003 21:11:42 -0000	1.16
  @@ -137,6 +137,7 @@
       if self.deliver:
         if not self.scratchdir: self.scratchdir=os.path.join(self.basedir,"scratch")
   
  +    if not self.logurl: self.logurl = default.logurl
       if not self.email: self.email = default.email
       if not self.mailserver: self.mailserver = default.mailserver
       if not self.prefix: self.prefix = default.prefix
  
  
  
  1.15      +4 -4      jakarta-gump/python/gump/check.py
  
  Index: check.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/check.py,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- check.py	7 Sep 2003 20:59:34 -0000	1.14
  +++ check.py	11 Sep 2003 21:11:42 -0000	1.15
  @@ -134,7 +134,7 @@
       checkExecutable(workspace, context, context.javaCommand,'-version',exitOnError)
       checkExecutable(workspace, context, 'javac','-help',exitOnError)
       checkExecutable(workspace, context, 'cvs','--version',exitOnError)
  -    if not context.noForrest and not checkExecutable(workspace, context, 'forrest','-version',0):

  +    if not context.noForrest and not checkExecutable(workspace, context, 'forrest','-help',0):

           context.noForrest=1
           context.addWarning('"forrest" command not found, no xdoc output')
           
  
  
  
  1.11      +4 -3      jakarta-gump/python/gump/conf.py
  
  Index: conf.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/conf.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- conf.py	5 Sep 2003 23:08:49 -0000	1.10
  +++ conf.py	11 Sep 2003 21:11:42 -0000	1.11
  @@ -95,6 +95,7 @@
       logLevel   = logging.INFO
       classpath = (os.getenv('CLASSPATH') or '').split(os.pathsep)  
       
  +    logurl		=	'http://cvs.apache.org/builds/gump/nightly/'
       bannerimage = 'http://jakarta.apache.org/images/jakarta-logo.gif'
       
       email = 'gump@lists.apache.org'
  
  
  

Mime
View raw message