Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-25-2018, 04:47 PM   #1
Tom11880
Junior Member
Tom11880 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle Paperwhite
How to change markup in content.opf when importing .epub file?

Hi,

I'm using Calibre for quite some time now, but recently the publisher of a series changed something inside content.opf.

Now, when converting .epup from this particular publisher to -mobi format for my Kindle Paperwhite, the ebook initially opens on the last page.

I tracked this down to the following line inside content.opf:

Code:
<reference type="text" title="Beginning" href="001.html#a0"/>
As soon as I change the title from "Beginning" to "Start", the ebook opens at the first page.

The question now is, can I automate this substitution when importing the .epub file into Calibre? (And if yes, how?)

thanks for any hint how to achieve this.
Thomas
Tom11880 is offline   Reply With Quote
Old 12-25-2018, 05:28 PM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by Tom11880 View Post
Hi,

I'm using Calibre for quite some time now, but recently the publisher of a series changed something inside content.opf.

Now, when converting .epup from this particular publisher to -mobi format for my Kindle Paperwhite, the ebook initially opens on the last page.

I tracked this down to the following line inside content.opf:

Code:
<reference type="text" title="Beginning" href="001.html#a0"/>
As soon as I change the title from "Beginning" to "Start", the ebook opens at the first page.

The question now is, can I automate this substitution when importing the .epub file into Calibre? (And if yes, how?)

thanks for any hint how to achieve this.
Thomas
See screenshot.
Click image for larger version

Name:	Screenshot from 2018-12-25 17-26-23.png
Views:	238
Size:	122.4 KB
ID:	168617

To find the start location I use the search and replace regex builder to look inside to find the start point.
Click image for larger version

Name:	Screenshot from 2018-12-25 17-33-57.png
Views:	182
Size:	92.8 KB
ID:	168619
bernie

Last edited by gbm; 12-25-2018 at 05:36 PM.
gbm is offline   Reply With Quote
Advert
Old 12-26-2018, 07:26 PM   #3
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 927
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Tom11880 View Post
I tracked this down to the following line inside content.opf:

Code:
<reference type="text" title="Beginning" href="001.html#a0"/>
As soon as I change the title from "Beginning" to "Start", the ebook opens at the first page.
The 'title' attribute value has no semantic meaning. It could be anything you want ("Beginning", "Start", "First", "Read", etc). The reallly important attribute is 'type'. The value 'text' indicates the first page of "real" content on the book (the e-reader will open on this page when first loading the book).

You need to make sure the 'href' attribute is pointing to the first page of bodymatter (after titlepage, copyright, toc, etc).
thiago.eec is offline   Reply With Quote
Old 12-29-2018, 06:21 AM   #4
Tom11880
Junior Member
Tom11880 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle Paperwhite
Cool! Thant worked, thank you very much!
Tom11880 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR in EPUB content.opf crankypants ePub 7 06-23-2016 01:22 AM
Ampersands and content.opf file AlexBell ePub 17 04-07-2016 09:44 PM
Change opf filename from content.opf to title.opf northstar7 Sigil 3 09-23-2013 12:44 PM
Sigil 0.5.3 keeps rebuilding my content.opf file from scratch mtrahan Sigil 7 04-28-2012 09:10 AM
cleaning the content.opf file Adjust ePub 6 09-01-2010 05:54 PM


All times are GMT -4. The time now is 07:01 PM.


MobileRead.com is a privately owned, operated and funded community.