05-23-2013, 08:34 AM | #1 |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
UUID creation?
I use a template when creating new ePubs - all the standard Cover/Title/CSS/OPF files already in a "default.epub" file which then gets Saved-As the new title. Everything has been going great until I realized that I've been forgetting to change the UUID in the OPF!
Code:
<dc:identifier id="BookId" opf:scheme="UUID"> urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</dc:identifier> And, more importantly, does Sigil have a function for doing that? If not, can it be added?? |
05-23-2013, 08:55 AM | #2 | ||
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
|
||
Advert | |
|
05-23-2013, 09:03 AM | #3 |
Grand Sorcerer
Posts: 12,609
Karma: 74358024
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
http://www.famkruithof.net/uuid/uuidgen might be of use.
|
05-23-2013, 09:21 AM | #4 |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
@PeterT: Thanks! At least I now have 500 UUID's to hold me over!
@Diap: I was thinking a random ID... but the idea is to keep them unique. The link Peter posted uses a time stamp combined with a code based on his network gear?? I would think something along these lines would be very simple to incorporate into Sigil - a button in the metadata editor or something - especially since it already has the functionality to generate the code - we just need to tell it to do it. |
05-23-2013, 09:51 AM | #5 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
There is a Linux standard command line tool called, what else?, uuidgen. Last edited by roger64; 05-23-2013 at 09:54 AM. |
Advert | |
|
05-23-2013, 11:51 AM | #6 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I simply use Jellby:YYYYMMDDx
where YYYYMMDD is the date of creation, and x is a letter I add if I create more than one a single day. |
05-23-2013, 01:13 PM | #7 | |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
Quote:
Although, aren't you worried there might be another Jellby out there doing the same thing - thus making the ID non-unique??!!?? |
|
05-23-2013, 01:13 PM | #8 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Out of curiosity, what would be the consequences if there were two separate epubs with the same identical UUID? Under what circumstances would the collision be detected?
|
05-23-2013, 01:20 PM | #9 |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
I found it when I was using the firefox plugin ePubReader to read my books. When I added the second book (and the third, fourth, fifth etc.) with a UUID of a book that was already in the catalog, it would delete the first book and replace it with the new one...thinking it was an updated version of the same book.
I haven't had that issue with the limited number of other readers I've tried, but it seems like it could cause a problem. |
05-24-2013, 06:56 AM | #10 | |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Quote:
|
|
05-24-2013, 10:01 AM | #11 |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
I did email the dev about the quirky behavior...that's how I found out what the problem was. Apparently he thought that wasn't a bug, but a feature! lol
|
05-24-2013, 12:43 PM | #12 |
Bookish
Posts: 954
Karma: 1806248
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Libra Color, Nxtpaper 11
|
ahh, the undocumented features again ..., memories, memories ...
|
05-24-2013, 10:34 PM | #13 | |
Bookmaker & Cat Slave
Posts: 11,482
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
05-31-2013, 07:14 AM | #14 | |
eBook DIYer
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
|
Quote:
1. Create a new blank epub, copy the uuid 2. Paste it into your original OPF 3. Edit the original NCX with your new uuid 4. Delete the new blank epub to avoid that ... Should work. |
|
05-31-2013, 12:31 PM | #15 | |
A Hairy Wizard
Posts: 3,186
Karma: 18843349
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
|
Quote:
Ah Hitch...making me dust off my Rocket Science Degree....it isn't the spinning of the Earth that keeps us attached, it is the force of gravity. As we all know F=Gm2m1/r^2 where G is the gravitational constant and m1/m2 are the masses of the two bodies and r is the distance between them. At no time is the angular speed of the Earth part of the equation. How do you think the astronauts could walk on the asteroid to plant the bomb in Armageddon?? Now if the Earth did stop spinning it would actually make it HARDER (in most non-polar insertions) to get into orbit, because we could not rely on that same angular speed (greatest at the equator) to contribute to the critical speed - the speed needed to achieve orbital velocity..... Hello Hello Hitch, there is no sleeping during my lectures!!! |
|
Tags |
uuid |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What are: url:http|// ... urn:urn|uuid| ... uri:http|// | 44reader | Library Management | 5 | 07-05-2012 01:42 PM |
Patch: Use real ASIN instead of UUID in mobi files to show correct cover in KindleApp | siebert | Calibre | 4 | 02-24-2012 08:13 AM |
Column Creation | Tehnam | Library Management | 16 | 06-13-2011 02:11 PM |
uuid isnull | jkcoder | Calibre | 6 | 09-26-2010 12:12 PM |
urn:uuid in Adept epubs? | NookyBook | ePub | 2 | 05-18-2010 01:05 PM |