Blog titles not parsing
Sam Ruby
rubys at intertwingly.net
Thu Oct 23 06:41:53 EST 2008
feeds at greenfeed.org.uk wrote:
> Hi Sam,
>
> I've got Venus up and running properly now, so I'm glad.
>
> One last thing (I hope) the subscription list on the left is not
> alphabetically sorted for blogs where the title has been pulled from
> the RSS, only where it has been added manually. Are you able to fix
> this?
It can be done, but I don't have time to test it properly at the moment.
Can you find the block containing the word "sort" in
planet/shell/tmpl.py, and replace it with the following:
# apply rules to convert feed parser output to htmltmpl input
output = {'Channels': [], 'Items': []}
output.update(tmpl_mapper(data.feed, Base))
sources = []
for feed in data.feed.get('sources',[]):
source = tmpl_mapper(feed, Base)
sources.append([source.get('name'), source])
sources.sort()
output['Channels'] = [source for name,source in sources]
for entry in data.entries:
output['Items'].append(tmpl_mapper(entry, Items))
If it works for you, I'll commit it.
> Cheers,
> Gordon
- Sam Ruby
More information about the devel
mailing list