diff --git a/examples/opml-top100.ini b/examples/opml-top100.ini index 5ba6771..19595c4 100644 --- a/examples/opml-top100.ini +++ b/examples/opml-top100.ini @@ -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 diff --git a/filters/mememe.plugin b/filters/mememe.plugin index 99cbd11..273c02c 100644 --- a/filters/mememe.plugin +++ b/filters/mememe.plugin @@ -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: diff --git a/planet/shell/tmpl.py b/planet/shell/tmpl.py index dfde6fe..d81a7ef 100644 --- a/planet/shell/tmpl.py +++ b/planet/shell/tmpl.py @@ -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))