aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-02-01 12:44:22 +0100
committercedricbonhomme <devnull@localhost>2010-02-01 12:44:22 +0100
commitcea5c67ef42b612473b101e41a54adb689e4ce45 (patch)
tree5ab5e816e69cfcbf75c8c30d03ecc96a598bfc3b /pyAggr3g470r.py
parentAdded comments. Some improvements. (diff)
downloadnewspipe-cea5c67ef42b612473b101e41a54adb689e4ce45.tar.gz
newspipe-cea5c67ef42b612473b101e41a54adb689e4ce45.tar.bz2
newspipe-cea5c67ef42b612473b101e41a54adb689e4ce45.zip
Added a menu to access more faster to feeds and some improvements of the CSS.
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r--pyAggr3g470r.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 67cdd3d4..bb4dbcea 100644
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -2,8 +2,8 @@
#-*- coding: utf-8 -*-
__author__ = "Cedric Bonhomme"
-__version__ = "$Revision: 0.2 $"
-__date__ = "$Date: 2010/31/01 $"
+__version__ = "$Revision: 0.3 $"
+__date__ = "$Date: 2010/02/01 $"
__copyright__ = "Copyright (c) 2010 Cedric Bonhomme"
__license__ = "GPLv3"
@@ -42,27 +42,33 @@ class Root:
"""
Main page containing the list of feeds and articles.
"""
+ self.dic = self.load_feed()
html = htmlheader
html += htmlnav
- html += """<br/><div class="right inner">"""
- html += """<h2>Search</h2>"""
- html += """<form method=get action="q/"><input type="text" name="v" value=""> <input
- type="submit" value="search"></form>"""
- html += """<a href="f/">Management of feed</a>"""
- html += """</div> <div class="left inner">"""
+ html += """<div class="right inner">\n"""
+ html += """<h2>Search</h2>\n"""
+ html += """<form method=get action="q/"><input type="text" name="v" value=""><input
+ type="submit" value="search"></form>\n"""
+ html += """<a href="f/">Management of feed</a>\n"""
+ html += "<hr />\n"
+ html += "Your feeds:<br />\n"
+ for rss_feed in self.dic.keys():
+ html += """<a href="/#%s">%s</a><br />\n""" % (rss_feed.encode('utf-8'), \
+ rss_feed.encode('UTF-8'))
+ html += """</div>\n<div class="left inner">\n"""
- self.dic = self.load_feed()
for rss_feed in self.dic.keys():
- html += '<h2><a href="' + self.dic[rss_feed][0][5].encode('utf-8') + \
- '">' + rss_feed.encode('utf-8') + "</a></h2>"
+ html += '<h2><a name="' + rss_feed.encode('utf-8') + '">' + \
+ '<a href="' + self.dic[rss_feed][0][5].encode('utf-8') + \
+ '">' + rss_feed.encode('utf-8') + "</a></a></h2>\n"
for article in self.dic[rss_feed]:
html += article[1].encode('utf-8') + " - " + \
'<a href="' + article[3].encode('utf-8') + \
'">' + article[2].encode('utf-8') + "</a>" + \
""" - [<a href="/description/%s">description</a>]""" % (article[0].encode('utf-8'),) + \
- "<br />"
-
+ "<br />\n"
+ html += "<hr />\n"
html += htmlfooter
return html
bgstack15