def code_feed_reader(project, mode='div'):
 url = ('http://code.google.com/feeds/p/%s/hgchanges/basic' % project)
 from gluon.contrib import feedparser
 g = feedparser.parse(url)
 if (mode == 'div'):
  html = XML(DIV(UL(*[LI(A(entry['title'], _href=entry['link'], _target='_blank')) for entry in g['entries'][0:5]]), _class='boxInfo', _style='padding-bottom:5px;'))
 else:
  html = XML(UL(*[LI(A(entry['title'], _href=entry['link'], _target='_blank')) for entry in g['entries'][0:5]]))
 return html

def code_feed_reader ( project , mode = 'div' ) : url = ( 'http://code.google.com/feeds/p/%s/hgchanges/basic' % project ) from gluon . contrib import feedparser g = feedparser . parse ( url ) if ( mode == 'div' ) : html = XML ( DIV ( UL ( * [ LI ( A ( entry [ 'title' ] , _href = entry [ 'link' ] , _target = '_blank' ) ) for entry in g [ 'entries' ] [ 0 : 5 ] ] ) , _class = 'boxInfo' , _style = 'padding-bottom:5px;' ) ) else : html = XML ( UL ( * [ LI ( A ( entry [ 'title' ] , _href = entry [ 'link' ] , _target = '_blank' ) ) for entry in g [ 'entries' ] [ 0 : 5 ] ] ) ) return html
parse code feeds .