View Single Post
Old 09-02-2015, 07:05 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,858
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi,

As designed, the content.opf is properly changed and maintained by all of the other calls in the bookcontainer interface. So if you could explain exactly what you are trying to change in the opf, I can explain how you might go about it with interface calls.
If what you want to do is not possible via the interface, you can get total control by unzipping a copy. See the epub_utils code available on this site for some utility routines if you end up having to do that,

KevinH

Quote:
Originally Posted by CalibUser View Post
I want to correct errors that sometimes occur in the content.opf file. I can read this file using bk.readotherfile("OEBPS/content.opf"). However, I cannot write to this file using bk.writeotherfile("OEBPS/content.opf", opf2) where opf2 is the updated file to write back to the ePub.

Is it possible to amend the content.opf file without having to unzip the ePub, amend the unzipped file, and then zip it back up again?

Thanks.
KevinH is offline   Reply With Quote