diff options
author | cedricbonhomme <devnull@localhost> | 2010-02-25 18:43:34 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-02-25 18:43:34 +0100 |
commit | 526c9fdccfaadb060f3a223ea02da1fe10128951 (patch) | |
tree | 88298a280e5f9126de8b9ef2b5891a9d510de699 | |
parent | Bug fix. Mark all articles from a feed as read. (diff) | |
download | newspipe-526c9fdccfaadb060f3a223ea02da1fe10128951.tar.gz newspipe-526c9fdccfaadb060f3a223ea02da1fe10128951.tar.bz2 newspipe-526c9fdccfaadb060f3a223ea02da1fe10128951.zip |
Added a default RSS icon for feeds without RSS icon.
-rwxr-xr-x | css/img/feed-icon-28x28.png | bin | 0 -> 1737 bytes | |||
-rw-r--r-- | feedgetter.py | 1 | ||||
-rw-r--r-- | pyAggr3g470r.py | 9 |
3 files changed, 8 insertions, 2 deletions
diff --git a/css/img/feed-icon-28x28.png b/css/img/feed-icon-28x28.png Binary files differnew file mode 100755 index 00000000..d64c669c --- /dev/null +++ b/css/img/feed-icon-28x28.png diff --git a/feedgetter.py b/feedgetter.py index 7cd0a812..2878d943 100644 --- a/feedgetter.py +++ b/feedgetter.py @@ -106,6 +106,7 @@ class FeedGetter(object): return try: feed_image = a_feed.feed.image.href + print feed_image except: feed_image = "" try: diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index b710da16..4748a3eb 100644 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -27,6 +27,8 @@ cherrypy.config.update({ 'server.socket_port': 12556, 'server.socket_host': bind path = {'/css/style.css': {'tools.staticfile.on': True, \ 'tools.staticfile.filename':path+'css/style.css'}, \ + '/css/img/feed-icon-28x28.png': {'tools.staticfile.on': True, \ + 'tools.staticfile.filename':path+'css/img/feed-icon-28x28.png'}, \ '/css/img/delicious.png': {'tools.staticfile.on': True, \ 'tools.staticfile.filename':path+'css/img/delicious.png'}, \ '/css/img/digg.png': {'tools.staticfile.on': True, \ @@ -83,12 +85,15 @@ class Root: html += """</div>\n<div class="left inner">\n""" for rss_feed_id in self.dic.keys(): + feed_link = self.dic_info[rss_feed_id][2].encode('utf-8') + if not feed_link: + feed_link = "/css/img/feed-icon-28x28.png" html += """<h2><a name="%s"><a href="%s" rel="noreferrer" target="_blank">%s</a></a> - <img src="%s" width="20" height="20" /></h2>\n""" % \ + <img src="%s" width="28" height="28" /></h2>\n""" % \ (rss_feed_id, self.dic[rss_feed_id][0][6].encode('utf-8'), \ self.dic[rss_feed_id][0][5].encode('utf-8'), \ - self.dic_info[rss_feed_id][2].encode('utf-8')) + feed_link) # The main page display only 10 articles by feeds. for article in self.dic[rss_feed_id][:10]: |