Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-05-2011, 05:56 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
opf file size bug - slow opening ???

this may not strictly be a calibre-only issue but hoping for some clues. esp on how calibre imports / generates .ofp files

I have one frustrating epub novel which takes 20 30 secs to open on my Sony PRS-650. I have spent ages trying to trouble shoot. have converted the epub to txt & back again to remove any junk formatting, have reformatted my sony memory, bug persists only with this one book....

Inspecting the associated opf file in calibre library I see that it contains a huge chunk of text - basically a whole chapter of the book, included in the summary as a free extract.. I'm wondering if that can / should have an impact on opening time. the book opens fine on PC in calibre viewer.

if that is not the answer then I am truly as a loss as to what could survive an ebub to txt to epub conversion & live on to cause trouble ???

it seems that is the cause though: having deleted a big chunk of the metadata in calibre book summary pane, the book is now opening OK on Sony.

any insights gratefully received. I think I can attach the original .opf without breaching any copyrights , so here it is :

PS could someone also clarify how the original .ofp is getting into calibre.

I have a source folder(outside of calibre) with epub, .ofp & jpg files;
I delete the book completely from calibre , then I copy only the source epub file to my desktop & then drag it into calibre, yet it appears in calibre library with a full set of metadata.
So is that stuff also embedded in epub or is calibre finding old data because book was previously in calibre library ?

PPS if I delete metadata then use calibre to search for replacement metadata it find this:

Vengeance Road
Rick Mofina
★★★★
See at: Google, Amazon.com, 9780778326380

and brings down that huge "free extract" of the book within the summary.

so is it "within spec" to have all that data in that file, and thus a ADE/Sony bug which causes the sony reader to choke on it, or is it a mis-use of metdata ?

Last edited by Manichean; 09-05-2011 at 06:46 AM. Reason: Removed Attachment
cybmole is offline   Reply With Quote
Old 09-05-2011, 06:46 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Moderator Notice
Attachment removed. Remember that copyrighted material cannot be uploaded to or attached to posts on Mobileread.
Manichean is offline   Reply With Quote
Advert
Old 09-05-2011, 07:05 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
The opf file discussed here is the opf file found in the calibre library book folder and is not copyrighted. This file is created by calibre and used to restore the database in the event of catastrophic metadata.db failure.

This file also is not sent to the ereader when you send the epub, so this file shouldn't have anything to do with slowness of ereader opening the epub.
DoctorOhh is online now   Reply With Quote
Old 09-05-2011, 07:16 AM   #4
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by dwanthny View Post
The opf file discussed here is the opf file found in the calibre library book folder and is not copyrighted. This file is created by calibre and used to restore the database in the event of catastrophic metadata.db failure.

This file also is not sent to the ereader when you send the epub, so this file shouldn't have anything to do with slowness of ereader opening the epub.
thanks for backing me up on point 1. the opf content which I uploaded is indeed what calibre downloads from public domian amazon.com when asked to fetch metadata , and so is NOT copyright


re point 2. surely the ofp is also part of the epub ( zip ) bundle and thus does get into the reader, and does get into calibre when only the .epub is imported.. if I unzip my source .epub I see a file called content.ofp in the bundle. this contains the same data as a calibre metadata download.
I have no other explanation
for epub with original (large) ofp = very slow to open; epub with edited ( short) ofp, opens normally.

it is not "normal" for downloaded metadata to contain an entire "sample chapter", I have no other instances of that, & no other books that take 30+secs to open!

so, having googled .opf files, I would guess that the delay is caused by reader software having to parse a whole HTML book chapter when analysing the large .opf. It's also maybe relevant that on sony, I can open book ( 30+secs), close it, then re-open it & it opens immediately the 2nd time ( opf analysis buffered ??? ) . But if I open another book in between I'm back to the v slow issue.

Last edited by cybmole; 09-05-2011 at 07:26 AM.
cybmole is offline   Reply With Quote
Old 09-05-2011, 07:23 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by cybmole View Post
re point 2. is the ofp also part of the epub ( zip ) bundle and thus does get into the reader, and does get into calibre when only the .epub is imported.
The opf in calibre's library is different then the one found in the epub itself. That said, it is not surprising if you see that full excerpt listed in the metadata. I opened a book in Sigil to take a look and the metadata did have the summary.

Just edit the metadata in calibre and delete the chapter excerpt from the summary and resend the book to your device. This should remove the offending info from the books metadata.
DoctorOhh is online now   Reply With Quote
Advert
Old 09-05-2011, 07:45 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
yes, that fixes the specific issue, but the more general question is who/ what was at fault here.

sony/ ADE software for not coping with a sample chapter embedded within .ofp; calibre for putting it there via metadata download; the publisher for putting it up on amazon....some combination of all 3 ???

i did google .ofp spec but found nothing specifically allowing or disallowing book text extracts.

PS it was also very frustrating - I investigated so many "wrong" answers before looking at .ofp. I converted the book into & out of .mobi, of .rtf, of .txt, I crawled through all the code & css in sigil looking for culprits, I reformatted my Sony drive even! - losing all my bookmarks in the process, thinking that is must be a hardware issue after converting to / from .txt & still seeing the bug!

Last edited by cybmole; 09-05-2011 at 07:51 AM.
cybmole is offline   Reply With Quote
Old 09-05-2011, 10:33 AM   #7
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
It think that Calibre is correct in including all the metadata that you set in Calibre into the .opf file. I do not see how Calibre can sensibly decide what metadata to include, so should include all it is given. Therefore the culprit is the person who supplied that inappropriate metadata in the first place (Amazon), or you for leaving it set in the Calibre metadata after downloading it? Of course it would also not be an issue if the reading software could handle it being present.

One thing that Calibre could perhaps do is provide a warning if it exceeds some arbitay limit, but what that limit should be I have no idea.
itimpi is offline   Reply With Quote
Old 09-05-2011, 10:48 AM   #8
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
thanks for those comments. it seems to be only the sony reader software that chokes. I have ADE on PC & that opens the original epub OK, as did calibre viewer. As Sony gives no helpful error messages there seems no way to dig any deeper.
cybmole is offline   Reply With Quote
Old 09-05-2011, 10:54 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by cybmole View Post
thanks for those comments. it seems to be only the sony reader software that chokes. I have ADE on PC & that opens the original epub OK, as did calibre viewer. As Sony gives no helpful error messages there seems no way to dig any deeper.
Your computer is a lot more powerful then any reader. So of course, you won't see any slowdown with ADE on your computer.
JSWolf is offline   Reply With Quote
Old 09-05-2011, 11:21 AM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by cybmole View Post
thanks for those comments. it seems to be only the sony reader software that chokes. I have ADE on PC & that opens the original epub OK, as did calibre viewer. As Sony gives no helpful error messages there seems no way to dig any deeper.
How big (bytes) was that OPF?
I would expect that a OPF would have the same (segment) size constraints as the books content
theducks is offline   Reply With Quote
Old 09-05-2011, 12:11 PM   #11
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by dwanthny View Post
The opf file discussed here is the opf file found in the calibre library book folder and is not copyrighted. This file is created by calibre and used to restore the database in the event of catastrophic metadata.db failure.
Ah, I may have missed the attachment type... cybmole, if you attached the OPF file, I apologize for deleting it. That's what happens if you just pop into the forum quickly between running lengthier calculations at work. Feel free to reattach the OPF if needed.
Manichean is offline   Reply With Quote
Old 09-05-2011, 12:53 PM   #12
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
its only 16k , not enough to trigger a page error.

the Sony does eventually cope, if you go away & make a cup of tea or something then come back a while later - but the apparency is that the reader has frozen & several times I resorted to pin into reset hole.... then hold power switch slider & pray.....

- copy of source .opf re-attached. ( it was a "found" book) & the .opf appears to be calibre-generated

one anomaly- please check this - if I open the attached file in notepad I see the big sample chapter html, but if I open in notepad++ I see only the short, useful meta stuff. no book text at all.
Attached Files
File Type: opf Vengeance Road - Rick Mofina.opf (15.7 KB, 410 views)

Last edited by cybmole; 09-05-2011 at 01:03 PM.
cybmole is offline   Reply With Quote
Old 09-05-2011, 01:02 PM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by cybmole View Post
its only 16k , not enough to trigger a page error.

the Sony does eventually cope, if you go away & make a cup of tea or something then come back a while later - but the apparency is that the reader has frozen & several times I resorted to pin into reset hole.... then hold power switch slider & pray.....

- copy of source .opf re-attached. ( it was a "found" book) & the .opf appears to be calibre-generated
I don't know if the Huge (IMHO mangled HTML) description: section is the problem.
Code:
</p><p>
All the Paragraph tags have been converted to entities,making the description, one Looooong sentence
theducks is offline   Reply With Quote
Old 09-05-2011, 01:12 PM   #14
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by theducks View Post
I don't know if the Huge (IMHO mangled HTML) description: section is the problem.
Code:
</p><p>
All the Paragraph tags have been converted to entities,making the description, one Looooong sentence
yes- the whole epub was like that, but it did'nt seem to upset the reader. I fixed all that for the book text with sigil regex, got it nicely formatted, then still had the slow opening bug. that's when I got into converting it to / from mobi, rtf, txt etc trying to figure what code could be causing the problem. I wasted a couple of hours on that, then another hour testing for possible problems with the reader before looking at the .ofp. I checked that I have latest sony firmware, reset everything to factory default, reformatted .... added/opened/deleted lots of other books OK...

I also have a sneaky feeling also that the book is missing 4 chapters towards the end; when I fixed up the TOC, it is missing 4 chapter numbers!
cybmole is offline   Reply With Quote
Old 09-05-2011, 04:53 PM   #15
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by cybmole View Post
I also have a sneaky feeling also that the book is missing 4 chapters towards the end; when I fixed up the TOC, it is missing 4 chapter numbers!
Just FYI - the contents of the TOC (.ncx file) would not necessarily tell you whether any chapters were missing. The important thing is whether all the (x)html files for all chapters are present in the epub and whether all those html files are listed in both the <spine> section and the <manifest> section of the .opf file inside the epub.
jackie_w is offline   Reply With Quote
Reply

Tags
opf


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] What's an OPF file? Anarel Calibre 8 03-28-2016 05:17 PM
OPF file OPS/package.opf is missing Run2Eat ePub 2 05-31-2011 06:52 PM
PRS-900 Bug in subscriptions and 3G, battery life, slow boot rjpawlak Sony Reader 0 11-22-2010 09:43 AM
cleaning the content.opf file Adjust ePub 6 09-01-2010 05:54 PM
Pocketbook 360 slow opening books? Kameli PocketBook 5 04-13-2010 08:05 AM


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


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