Thread: OPF & guide
View Single Post
Old 08-05-2009, 03:19 PM   #21
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Suppose the user wants to set a new cover in an epub file. Now should calibre replace the first entry in the spine or not? That is the question.

The only way to unambiguously answer it is to have some pointer in the OPF file that tells calibre whether the first entry in the spine is a cover or not.

Try to guess if the first entry is a cover is not at all robust, just take my word for it, I lack the patience to enumerate all the cases where any guessing algorithm will fail.
What about presenting that first image to the user (in a window) at the beginning of the conversion process, and asking them to indicate (by a click) whether it is to be deleted or left in place after the addition of the new cover at the beginning of the eBook?

That seems dummy proof, no?

- Ahi
ahi is offline   Reply With Quote