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/syndication rss.py syndicator.py
Date Sat, 06 Dec 2003 01:42:29 GMT
ajack       2003/12/05 17:42:29

  Modified:    python/gump/syndication rss.py syndicator.py
  Log:
  More work on RSS. It still is missing the pretty stuff
  
  Revision  Changes    Path
  1.4       +23 -0     jakarta-gump/python/gump/syndication/rss.py
  
  Index: rss.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/syndication/rss.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- rss.py	5 Dec 2003 15:13:21 -0000	1.3
  +++ rss.py	6 Dec 2003 01:42:29 -0000	1.4
  @@ -285,7 +285,30 @@
                       moduleURL,	\
                       escape(module.getDescription()), \
                       self.gumpImage))
  +                      
  +        s=module.getStats()
  +        datestr=time.strftime('%Y-%m-%d')
  +        timestr=time.strftime('%H:%M:%S')
  +         
  +        #           
  +        # Get a decent description
  +        #
  +        content=self.getModuleContent(module,self.run)
  +                        
  +        #
  +        #
  +        #
  +        item=Item(('%s %s %s') % (module.getName(),module.getStateDescription(),datestr),
\
  +                  moduleURL, \
  +                  content, \
  +                  module.getName(), \
  +                  ('%sT%s%s') % (datestr,timestr,TZ))
           
  +        # Generate changes
  +        if not s.currentState == STATE_NONE and	\
  +            not s.currentState == STATE_UNSET:   
  +            moduleRSS.addItem(item)  
  +            
           for project in module.getProjects():  
               self.syndicateProject(project,moduleRSS,mainRSS)      
                     
  
  
  
  1.3       +8 -4      jakarta-gump/python/gump/syndication/syndicator.py
  
  Index: syndicator.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/syndication/syndicator.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- syndicator.py	5 Dec 2003 12:25:54 -0000	1.2
  +++ syndicator.py	6 Dec 2003 01:42:29 -0000	1.3
  @@ -113,13 +113,13 @@
                                       + stateName(stats.previousState)  \
                                       + '\n\n'
       
  -        self.addSundries(project,content)
  +        content += self.addSundries(project)
                   
           return content
   
       
   
  -    def getModuletContent(self,module,run):
  +    def getModuleContent(self,module,run):
           
           resolver=self.run.getOptions().getResolver()
           
  @@ -141,11 +141,13 @@
                                       + stateName(stats.previousState)  \
                                       + '\n\n'
       
  -        self.addSundries(module,content)
  +        content += self.addSundries(module)
                   
           return content
   
  -    def addSundries(self,object,content):
  +    def addSundries(self,object):
  +        
  +        content = ''
           
           resolver=self.run.getOptions().getResolver()    
           
  @@ -169,6 +171,8 @@
               content += '<table>'
               
           content += '\n\n\n<img alt=\'Brought to you by Jakarta Gump\' src=\'http://jakarta.apache.org/gump/images/bench.png\'/>'
  +        
  +        return content
                 
   def syndicate(run):
       
  
  
  

Mime
View raw message