OPML top 100 changes

This commit is contained in:
Sam Ruby 2009-01-09 03:11:16 -05:00
parent a68ab81427
commit bfca5567ab
3 changed files with 12 additions and 7 deletions

View File

@ -6,7 +6,7 @@
# link: Link to the main page
# owner_name: Your name
# owner_email: Your e-mail address
name = OPML Top 100
name = Techmeme Leaderboard
link = http://planet.intertwingly.net/top100/
owner_name = Sam Ruby
owner_email = rubys@intertwingly.net
@ -31,6 +31,10 @@ activity_threshold = 90
# filters to be run
filters = excerpt.py
# Don't let any one feed monopolize the output (symptom often occurs when
# somebody 'migrates' their weblog.
new_feed_items = 4
bill_of_materials:
.htaccess
favicon.ico
@ -49,5 +53,5 @@ filters = mememe.plugin
sidebar = //*[@id="footer"]
# subscription list
[http://share.opml.org/opml/top100.opml]
[http://www.techmeme.com/lb.opml]
content_type = opml

View File

@ -426,7 +426,7 @@ for i in range(0,len(weighted_links)):
# technorati link
a = li.newChild(None, 'a', None)
tlink = 'http://technorati.com/blogs/'
tlink = 'http://technorati.com/search/'
if link.startswith('http://'):
a.setProp('href',tlink + quote_plus(link[7:]))
else:

View File

@ -197,11 +197,12 @@ def template_info(source):
# apply rules to convert feed parser output to htmltmpl input
output = {'Channels': [], 'Items': []}
output.update(tmpl_mapper(data.feed, Base))
sources = [(source.get('planet_name',None),source)
for source in data.feed.get('sources',[])]
sources = []
for feed in data.feed.get('sources',[]):
source = tmpl_mapper(feed, Base)
sources.append([source.get('name'), source])
sources.sort()
for name, feed in sources:
output['Channels'].append(tmpl_mapper(feed, Base))
output['Channels'] = [source for name,source in sources]
for entry in data.entries:
output['Items'].append(tmpl_mapper(entry, Items))