Quote:
Originally Posted by JSWolf
There is a simple solution. You can do it the way the ModifyePub plugin does it. You can create an ORIGINAL_EPUB file for the original ePub is such a file does not exists. That way it's very easy to restore the original ePub if need be.
|
Is this what you are suggesting? Assume the epub file for a book is "book.epub" and I do the following with an external program:
- Copy book.epub
- Copy book.epub to book.ORIGINAL_EPUB
- Use
Code:
calibredb add_format
to add book.ORIGINAL_EPUB to formats.
- Use
Code:
calibredb remove_format
to remove book.ebub from the format list.
- Use my stuff to paginate my copy of book.epub and name it book.epub.
- Use
Code:
calibredb add_format
to add the paginated book.epub to the format list.
- Done.
This gets the job done using all external tools. I could do this quickly (a day or two) and sort of integrate epubpaginator with Calibre.
But what I think is that you are suggesting I use ModifyePub as a template and create a Calibre Plugin.
Well.
I have looked at creating a Calibre plugin and I think it would take me weeks to figure out. I do pretty well with python and python libraries and I have figured out enough about epub to be pretty dangerous, but when I look at the Calibre plugin examples, my eyes glaze over. I spent my career writing verilog code and down to the metal diagnostic software to verify my hardware designs, not complex object-oriented code.
Classes and the complex structure of Calibre (to say nothing of QT) seem pretty overwhelming to me.
Would you recommend me not creating such a hack? Do you think maybe I am smarter that I think and can really make a Calibre plugin??
And, by the way, if I do generate ebook.ORIGINAL_EPUB, you imply it is easy to restore. Is that done by some magic in the calibre interface? or? The only way I can see to do this is to export ebook.ORIGINAL_EPUB to disk, rename it, and add it back.