Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2012, 06:44 AM   #1
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
Sigil corrupting content.opf (0.4, 0.5)

This appears to be an issue since Sigil 0.4x - changing or a missing bookID causes Sigil to overwrite/replace content.opf with default values, deleting not only all metadatas but also mixing up all chapters due to a forced alphabetical sort. This also happens when you are opening a fully working epub with Sigil. Is there a way to workaround this ?

thanks
cyana
cyana is offline   Reply With Quote
Old 02-11-2012, 10:13 AM   #2
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,889
Karma: 55267620
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 cyana View Post
This appears to be an issue since Sigil 0.4x - changing or a missing bookID causes Sigil to overwrite/replace content.opf with default values, deleting not only all metadatas but also mixing up all chapters due to a forced alphabetical sort. This also happens when you are opening a fully working epub with Sigil. Is there a way to workaround this ?

thanks
cyana
5.2 HAS a sort option in the Book Browser. If you use that without care , the whole list will get sorted, possibly scrambling your book chapter order.

I have not seen your first bug claim in action (and I am a klutz, so it had plenty of chances ).
theducks is offline   Reply With Quote
Advert
Old 02-11-2012, 11:52 AM   #3
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by cyana View Post
This appears to be an issue since Sigil 0.4x - changing or a missing bookID causes Sigil to overwrite/replace content.opf with default values, deleting not only all metadatas but also mixing up all chapters due to a forced alphabetical sort. This also happens when you are opening a fully working epub with Sigil. Is there a way to workaround this ?
Could you give a more specific example of what you are doing?

In 0.5.2 at least, if I open an epub with no bookid or a blank bookid (created by unzipping/manually editing/zipping a good epub file), or delete the bookid in content.opf and save, Sigil puts in BookId as the id and all the chapters are left as is. Or are you doing something different?


Sort in the book browser can certainly give you issues if your chapters aren't supposed to be in alphabetical or numerical order But although that might fix the chapter order issue, it wouldn't fix metadata if indeed its going missing.
meme is offline   Reply With Quote
Old 02-11-2012, 12:46 PM   #4
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
Hello meme & theducks,

thanks for your reply ! I've added a screenshot so you can see what happens. To the left you see content.opf of the epub file as is. To the right you see what happens when the epub is opened with Sigil
Attached Thumbnails
Click image for larger version

Name:	example.jpg
Views:	347
Size:	608.4 KB
ID:	82441  
cyana is offline   Reply With Quote
Old 02-11-2012, 01:07 PM   #5
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
I don't see an issue with your book id, so it seems yovalentinesur content.opf is corrupt for another reason, or at least corrupt according to Sigil.
meme is offline   Reply With Quote
Advert
Old 02-11-2012, 01:46 PM   #6
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
It opens with Sigil 0.34 without problems, actually it was created by Sigil 0.3.1 (as you can see from the metadata).

The issue is, that the original content.opf does not have any bookId, so Sigil >=0.4 rebuilds the file from the scratch without warnings.

Same happens when I want to change the BookId on any epub from UUID to ISBN within Sigil.

Last edited by cyana; 02-11-2012 at 01:57 PM.
cyana is offline   Reply With Quote
Old 02-11-2012, 01:49 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Why is the <dc:identifier> metadata element being changed or removed in the first place? Your original ePub indicates that it has a unique-identifier in the <package> element, but then no unique-identifier is found in the metadata. A valid ePub requires the dc:identifier, dc: language and dc:title elements. So your example ePub is just not valid right from the get-go (regardless if past versions of Sigil let that slide).

Are you asking for Sigil to maintain your ePub's invalid opf status upon first opening? Or are you asking for Sigil to be able to account for the myriad of ways an opf can be invalid and fix it in a non-destructive manner?

Quote:
It opens with Sigil 0.34 without problems, actually it was created by Sigil 0.3.1 (as you can see from the metadata). Same happens when I want to change the BookId on any epub from UUID to ISBN within Sigil.
If you want to switch to ISBN, then you need to change the scheme to ISBN in the opf file before saving and closing, just deleting the <dc:identifier> element and reopening won't work.

Change the <dc:identifier> element from:
Code:
<dc:identifier id="BookId" opf:scheme="UUID">urn:uuid:731aae73-ffff-469e-a5f6-b9c0ebca3360</dc:identifier>
To something like (with a valid ISBN, of course):
Code:
<dc:identifier id="BookId" opf:scheme="ISBN">0123456789</dc:identifier>
And save the ePub. All your existing metadata will be retained and Sigil won't rebuild your opf when you next open it.

Last edited by DiapDealer; 02-11-2012 at 02:03 PM.
DiapDealer is offline   Reply With Quote
Old 02-11-2012, 01:57 PM   #8
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,889
Karma: 55267620
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 cyana View Post
Hello meme & theducks,

thanks for your reply ! I've added a screenshot so you can see what happens. To the left you see content.opf of the epub file as is. To the right you see what happens when the epub is opened with Sigil
I see the files in Alpha-Numeric sort order in the Book Browser and NCX
That is what controls the viewing order. The OPF is just a manifest and IIRC ordering is not essential, just correctness
theducks is offline   Reply With Quote
Old 02-11-2012, 02:03 PM   #9
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
The problem is that Sigil versions prior to 0.4 created/tolerated epubs without BookIds. Now when you want to edit the epub with a later version, your content.opf is messed up without any warnings. If a BookId is required now thats fine however at least the user should know the opf file is rebuilt from the scratch and the chapters are mixed up in most cases so the book becomes unreadable ...
cyana is offline   Reply With Quote
Old 02-11-2012, 02:06 PM   #10
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
Quote:
Originally Posted by theducks View Post
I see the files in Alpha-Numeric sort order in the Book Browser and NCX
That is what controls the viewing order. The OPF is just a manifest and IIRC ordering is not essential, just correctness
Thanks for your reply - actually it seems that at least on iPad/iPhone the chapter order ist taken from the spine
cyana is offline   Reply With Quote
Old 02-11-2012, 02:09 PM   #11
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,889
Karma: 55267620
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 cyana View Post
The problem is that Sigil versions prior to 0.4 created/tolerated epubs without BookIds. Now when you want to edit the epub with a later version, your content.opf is messed up without any warnings. If a BookId is required now thats fine however at least the user should know the opf file is rebuilt from the scratch and the chapters are mixed up in most cases so the book becomes unreadable ...
The OPF does not control viewing order.

Was your book missing the NCX file originally?
theducks is offline   Reply With Quote
Old 02-11-2012, 02:15 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by theducks View Post
The OPF does not control viewing order.
The spine section of the OPF certainly controls viewing order, does it not?
DiapDealer is offline   Reply With Quote
Old 02-11-2012, 02:20 PM   #13
cyana
Enthusiast
cyana began at the beginning.
 
cyana's Avatar
 
Posts: 37
Karma: 10
Join Date: Dec 2011
Device: iPad
Quote:
If you want to switch to ISBN, then you need to change the scheme to ISBN in the opf file before saving and closing, just deleting the <dc:identifier> element and reopening won't work.
Thanks for your reply! I think this was the problem - at least it works for me now. So it might well be that I only edited the urn:uuid statement and forgot about the scheme.
cyana is offline   Reply With Quote
Old 02-11-2012, 02:21 PM   #14
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,889
Karma: 55267620
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 DiapDealer View Post
The spine section of the OPF certainly controls viewing order, does it not?
I am obviously way off in left field , confusing the TOC with the book order.
My bad.
theducks is offline   Reply With Quote
Old 02-11-2012, 02:24 PM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cyana View Post
Thanks for your reply! I think this was the problem - at least it works for me now. So it might well be that I only edited the urn:uuid statement and forgot about the scheme.
If you're happy I'm ecstatic.

Quote:
Originally Posted by theducks View Post
I am obviously way off in left field , confusing the TOC with the book order.
My bad.
We all have our moments. You're forgiven.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil resets edits to content.opf adv_dp_fan Sigil 7 09-28-2011 06:50 PM
Default book language to be saved in content.opf? moriakaice Calibre 7 05-21-2011 05:02 PM
editing OPF on sigil and adding flash file shlomof Sigil 5 02-23-2011 02:39 PM
Sigil OPF to MOBI Pocket Creator crutledge Sigil 9 10-08-2010 01:26 PM
cleaning the content.opf file Adjust ePub 6 09-01-2010 05:54 PM


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


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