|
|
#1 |
|
Hack
![]() Posts: 34
Karma: 12
Join Date: Dec 2009
Device: Kobo Aura HD, Kindle Paperwhite
|
CustomIndexRecipe
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 |
|
|
|
|
|
#2 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Code:
def custom_index(self):
filepath = path_to_custom_index.html
return filepath
|
||
|
|
|
| Advert | |
|
|
|
|
#3 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,600
Karma: 28548974
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You dont really need customindex for this. Just use basicnewsrecipe and override parse_index, return file:// URLs and you should be fine, though the backwards OS might give you a bit of trouble with filepath URLs
|
|
|
|
|
|
#4 |
|
Hack
![]() Posts: 34
Karma: 12
Join Date: Dec 2009
Device: Kobo Aura HD, Kindle Paperwhite
|
Silly Questions
You were right about filepath URLs being tricky. I'm not a python programmer, so I just hack around from examples until I can make them work.
I found it was easier to just access the file system by using the web server locally on my Mac. [silly questions deleted ... answered!] Muchas Gracias! Last edited by EnergyLens; 03-26-2010 at 10:32 AM. |
|
|
|
![]() |
| Tags |
| calibre, customindex ebook-convert, scrapbook |
| Thread Tools | Search this Thread |
|