Quote:
Originally Posted by kovidgoyal
No parse_index is it. You'll have to basically have parse_index optionally return a list of 3-tuple instead of 2-tuples where the third element is the description and change the code in feeds.__init__ to optionally handle 3-tuples
Should also be a relatively easy change to add descriptions to the page listing feeds as well as the feed page itself (the reason it's done the way it is is that mostly I envisage people using the metadata tanle of contents, where you can't really have a description)
|
Thanks for the comments. I've looked over feeds.__init__ and parse_index. As you say, it doesn't look too hard to patch to allow an optional 3 tuple to bring in a feed description with parse_index. OTOH, I was just writing this recipe for others to use, so I'd have to patch, then get it accepted, then have a user upgrade before they could use the recipe. Plus, the docs would need updating for anyone else to use the 3 tuple format in a recipe.
I've already got a working version using the 2-tuple format, with the feed descriptions just added as comments in the recipe. It's usable now.
Do you think writing a patch would be worthwhile? If so, I'll add a bug track and put it on my todo. Up to this point, each patch I've written has been something that I needed personally, so it didn't matter if it was added to the main branch.
BTW, while looking over the code, I spotted what looks like a typo in line 125 of src\calibre\web\feeds\__init__.py/125 in
populate_from_preparsed_feed
Code:
self.descrition = ''
Looks like a missing "p" I'd post a bug, but I didn't have time to track down the effect, so maybe it's not one.