![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
@DiapDealer ISBN vs UUID
Hello DiapDealer...
Found an old thread where you answered the question I have, which is how to use the ISBN in the metadata, vs the UUID... but I am new to opf and metadata code and am too dense ... I kindly need an example of what you mean. You said in this previous post in 2013): "It's quite trivial to change your ePub to use the ISBN identifier as the unique identifier (in Sigil) and get rid of the autogenerated UUID at any time, however: "Add the ISBN metadata (either through the metadata editor or add it manually in the OPF). Open the OPF file and add an id attribute to the isbn dc:indentifier entry you just created (I often use "isbn" but just so long as it's not the same as the "unique-identifier" attribute of the "package" element). Then change the "unique-identifier" attribute of the "package" element to match the id you just created for your ISBN entry. Save the epub and delete the entire <dc:identifier></dc:identifier> entry for the old UUID from the OPF." You lost me at "add an id attribute to the isbn identifier..." This is the relevant code (I think): <package version="2.0" unique-identifier="BookId" xmlns="http://www.idpf.org/2007/opf"> <metadata xmlns ![]() <dc:identifier opf:scheme="ISBN">ISBN [isbn # here]</dc:identifier> I don't know the protocol for adding an attribute to a dc element.. ? If it needs dashes or underscores or colons or a single space or what? Sorry! Could you give an example...? I'd really appreciate it. |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,301
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
On the first line you are simply telling what the name of the variable is that you are using for the unique-identifier. In this example it is "uid".
<package version="2.0" unique-identifier="uid" xmlns="http://www.idpf.org/2007/opf"> Then you are defining what that variable is: <dc:identifier id="uid">4183454533</dc:identifier> You can easily use the ISBN like this: <package version="2.0" unique-identifier="BookID" xmlns="http://www.idpf.org/2007/opf"> <dc:identifier id="BookID">ISBN [isbn # here]</dc:identifier> |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
Quote:
![]() dc ![]() dc:imprint Imprint Publisher Here ... which it does look like that in the metadata window... but when I switch to opf file, I see it inserts it with a name tag and encloses it in meta brackets... instead of just listing dc:imprint under all the other dc:xxxx elements. So not sure I am getting that right either. I know this is no-brainer stuff that takes one second to those familiar! EDIT: Argh, even my posts are making fun of me, inserting smileys! Last edited by Trane; 01-19-2019 at 06:10 PM. |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I'll try to color-code my stuff, maybe that'll make it easier to understand too!
Let's say you rip open a book created in Sigil. In your content.opf, you'll see something like this: Spoiler:
These two always have to match: - unique-identifier (up top) - id (down below) You can see they both say BookId. Note: Sigil uses "BookId", but you could call this anything. Note #2: The blue part is just a randomly generated UUID. All books are probably going to have different gibberish here depending on which program built it. Method 1 As Diap initially explained, you can change "BookId" to whatever name you name want. He mentioned he likes to use "isbn". So change both red parts, and move the id to where it's needed: Spoiler:
Remove the entire Blue line because it's not needed any more: Spoiler:
Method 2 Or as Turtle91 said: Just move the id="BookId": Spoiler:
And you can delete the entire blue line: Spoiler:
Quote:
Or when you're in the Advanced Editor, right below "Submit Reply" button, you can see a little checkbox for Disable smilies in text. |
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I have nothing to add.
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I was just happy you guys saved me the trouble of having to go back and do my homework.
![]() |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
But I'm not sure about the toc.ncx, does this line have to be updated as well? toc.ncx: Code:
<meta name="dtb:uid" content="urn:uuid:acfa4835-af6c-4301-87f9-8c3ce0b9df94" />
Not too sure what you should update if you manually remove the UUID. |
|
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
@Tex2002ans Thanks SO MUCH for that super clear tutorial. Always appreciate the help I get here.... you guys are invaluable.
I will check back to see if I should edit the tox as well. Again, can't thank you enough. |
![]() |
![]() |
![]() |
#10 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 808
Karma: 2416112
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
Without an update you will get an error (EpubCheck): Code:
ERROR(NCX-001): NCX identifier ('urn:uuid:acfa4835-af6c-4301-87f9-8c3ce0b9df9') does not match OPF identifier ('1-23456-789-0'). |
|
![]() |
![]() |
![]() |
#11 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
Quote:
![]() Don't know where I would be without Sigil and this forum!!! MANY THANKS! |
|
![]() |
![]() |
![]() |
#12 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
PS In this line:
<dc:identifier opf:scheme="UUID" id="ISBN">urn:uuid:[isbn # here]</dc:identifier> ... I changed the blue to "urn:isbn" ... As stated, no errors in EpubCheck, but Kindle Converter hangs for first time and won't convert. When I hit cancel it says "check file, it might be corrupted." Should I leave it as "urn:uuid" ? EDIT: Never mind, the answer was in Tex's post! Last edited by Trane; 01-20-2019 at 04:15 PM. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The ncx dbt:uid entry being flagged if it doesn't match the opf unique-id is actually relatively new to Epubcheck. I'm almost certain it wasn't problem back in 2013.
![]() In all honesty, I wouldn't even bother removing the uuid, or changing the unique-id from the uuid to the new isbn entry. It's really not worth the trouble, and there's absolutely no advantage to be gained. Just leave the uuid, the unique-id, and the ncx dbt:uid alone; then add a new ISBN meta item and be done with it. I can't remember the last commercial epub I looked at that used the isbn as the unique identifier. *shrug* Last edited by DiapDealer; 01-20-2019 at 05:13 PM. |
![]() |
![]() |
![]() |
#14 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 51147
Join Date: Dec 2016
Device: android tablet
|
Quote:
![]() But regardless of what I do, the one whose code I changed (and re-checked many times now) will not convert, even though it gets zero errors in EpubCheck. I feel bad I made Tex take all that time to explain how to do all that to me, but FWIW (Tex), I did learn in the process... about code too, which I appreciate! But it looks like I will do as you suggest, as that seems to be the only way the Kindle Converter program is happy with it. So I'll leave well enough alone. BTW, I read the ISBN should be entered in the metadata field without hyphens. Is that the consensus? Again, a million thanks! |
|
![]() |
![]() |
![]() |
#15 | ||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
I recently purchased Wheel of Time Books #1-#6. #1 had an ISBN as the ID. The others used UUIDs. And The Expanse Book #5 had mismatching: content.opf: Quote:
Quote:
And another Tor book had: content.opf: Quote:
Quote:
(Because I've had books where I've cleaned up/converted, forgot to change UUID, and the highlights carry over in all the wrong locations. After copying/pasting in new info, the old highlights disappeared.) Quote:
I just insert it exactly as it looks as ISBN-10 or ISBN-13. |
||||||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is UUID? | Rellwood | Calibre | 7 | 05-24-2017 11:32 PM |
urn:urn|uuid versus regular(?) uuid | At_Libitum | Library Management | 4 | 10-16-2013 07:47 PM |
UUID | crutledge | Sigil | 8 | 09-25-2013 03:39 AM |
Using the ISBN as "BookID" instead of UUID | ibu | Sigil | 19 | 08-20-2013 11:29 AM |
Stupid Question: ISBN-10 and ISBN-13 | Tegan | Library Management | 4 | 03-11-2011 01:20 AM |