Quote:
Originally Posted by EnergyLens
Are there any examples using the CustomIndexRecipe class?
I have heaps of web content that I've downloaded using the Firefox Scrapbook plug-in and I want to use Calibre's ebook-convert command line tool to mass-edit them but can't quite figure out how to use CustomIndexRecipe.custom_index()
There don't seem to be any examples of this anywhere?
Thanks
|
I assume you've read this:
Quote:
CustomIndexRecipe¶
class calibre.web.feeds.news.CustomIndexRecipe¶
This class is useful for getting content from websites that don’t follow the “multiple articles in several feeds” content model.
CustomIndexRecipe.custom_index()¶
Return the filesystem path to a custom HTML document that will serve as the index for this recipe. The index document will typically contain many <a href=”...”> tags that point to resources on the internet that should be downloaded.
|
I've also noticed the dearth of examples. No built-in recipes use it. What have you tried? It looks fairly straight forward. Just guessing, but I'd try using the CustomIndexRecipe in your class and then:
Code:
def custom_index(self):
filepath = path_to_custom_index.html
return filepath
I have my doubts that this is going to be very successful, but I suppose it depends on what's in your index. Maybe Kovid will comment. Let us know what you find out.