Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-25-2022, 04:42 PM   #1
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Question about dc:identifier

I have a number of epub 3 files to prepare that are structurally similar. I was thinking of getting one file ready in Sigil with all the fonts and CSS etc and then just saving under another name and swapping the cover and content for each new epub.

But this would mean the dc:identifier number would be the same. I guess this is generated randomly every time Sigil opens. What purpose does the dc:identifier number serve? And could I just change it to something else manually in .opf file for each new epub? Is it necessary to have it at all?
bookman156 is offline   Reply With Quote
Old 08-25-2022, 06:15 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,191
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bookman156 View Post
I have a number of epub 3 files to prepare that are structurally similar. I was thinking of getting one file ready in Sigil with all the fonts and CSS etc and then just saving under another name and swapping the cover and content for each new epub.

But this would mean the dc:identifier number would be the same. I guess this is generated randomly every time Sigil opens. What purpose does the dc:identifier number serve? And could I just change it to something else manually in .opf file for each new epub? Is it necessary to have it at all?
The dc:identifier is a required element and must be unique. See dc:identifer on the EPUB 3.3 candidate draft though that wording hasn't changed much in a decade.
DNSB is offline   Reply With Quote
Advert
Old 08-25-2022, 06:23 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
The existing dc identifier should be unique. The primary one is used in font deobfuscation/obfuscation. It can be used in the ncx as well and must match the opf one if an ncx exists.

A random uuid primary dc:identifier can be generated for new empty epubs.

But using the template epub plugin would be even easier as it was designed to handle that.

https://www.mobileread.com/forums/sh...d.php?t=341735
KevinH is offline   Reply With Quote
Old 08-25-2022, 06:47 PM   #4
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Ah, the template plugin looks interesting.

But to check, I could just open up Sigil, copy a freshly generated identifier, and then paste that into the epub I created by save-as, and I would be achieving the same, yes?
bookman156 is offline   Reply With Quote
Old 08-25-2022, 07:46 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by bookman156 View Post
I have a number of epub 3 files to prepare that are structurally similar. I was thinking of getting one file ready in Sigil with all the fonts and CSS etc and then just saving under another name and swapping the cover and content for each new epub.
You can create a basic "template" folder with your common:
  • HTML files
    • Title page
    • Copyright page
    • Front/Backmatter
  • CSS
  • Fonts
  • Images
    • Logos
    • Temporary covers

Then when you open an EPUB, you can "Import" those files.

Some of these methods were discussed in:

Doitsu then created an "EPUBTemplate" plugin to handle just this case.

Edit: Ahh, yes. KevinH's "Template" plugins work even better! I think he came up with that one after the discussion in those UUID threads!

Quote:
Originally Posted by bookman156 View Post
But this would mean the dc:identifier number would be the same. I guess this is generated randomly every time Sigil opens. What purpose does the dc:identifier number serve?
It is used in some devices for highlights/notes, syncing books, checking to see if file/book is new, etc.

Plus a few other technical EPUB things. (See topic below.)

Quote:
Originally Posted by bookman156 View Post
And could I just change it to something else manually in .opf file for each new epub?
Yes, it is possible.

See the discussion in:

We went through all the in-depth details.

And I swear, somewhere along the line, someone made a plugin to generate a new random UUID without needing to create a new EPUB... but maybe I'm imagining that.

I always just started from a new EPUB + imported all needed "template" files in... or in the very rare case, I manually tweaked the UUIDs (using the instructions I wrote in this post).

Last edited by Tex2002ans; 08-25-2022 at 07:49 PM.
Tex2002ans is offline   Reply With Quote
Advert
Old 08-26-2022, 07:09 AM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
There are websites that provide uuid generators that might be easier to copy and paste from. Also python's uuid module has a built in support for generating them as well if you want to automate it in a script. The Template plugin would be easiest probably and does support loading exactly what you want with base xhtml, base css, etc. all in one go.

Quote:
Originally Posted by bookman156 View Post
Ah, the template plugin looks interesting.

But to check, I could just open up Sigil, copy a freshly generated identifier, and then paste that into the epub I created by save-as, and I would be achieving the same, yes?

Last edited by KevinH; 08-26-2022 at 08:07 AM.
KevinH is offline   Reply With Quote
Old 08-26-2022, 10:57 AM   #7
CubGeek
Connoisseur
CubGeek began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Sep 2021
Location: Upstate NY, USA
Device: iPad Pro, Kindle basic
Quote:
Originally Posted by KevinH View Post
The existing dc identifier should be unique. The primary one is used in font deobfuscation/obfuscation. It can be used in the ncx as well and must match the opf one if an ncx exists.

A random uuid primary dc:identifier can be generated for new empty epubs.

But using the template epub plugin would be even easier as it was designed to handle that.

https://www.mobileread.com/forums/sh...d.php?t=341735
Thanks for this link!

Question about the instructions: They say to open the Sigil Plugin Preferences directory and place the "template3" directory there. I've done so (sigil-ebook\plugin_prefs\template3) and placed my template files into it using the FolderOut plugin. When I run the Template3 plugin now, however, I get "Status Failed: Template folder is not a directory or does not exist" error. I've tried case-sensitive (template3→Template3) and that doesn't work either. What am I doing wrong?


EDIT: ahhh... it needs to be in the sigil-ebook directory, not in the plugin_prefs directory. Seems the wording in the instructions threw me. Sorry about that!

Last edited by CubGeek; 08-26-2022 at 11:22 AM. Reason: reason discovered.
CubGeek is offline   Reply With Quote
Old 08-26-2022, 12:25 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
Yes where the Sigil Open Preference Folder points. There is a button inside Sigil Preferences that should take you there. Its location differs depending on platform and even build options on Linux.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"fragment identifier is not defined" question eBooked Workshop 4 07-22-2022 05:07 PM
identifier rules? dashiiek Calibre 1 01-19-2022 08:20 PM
What identifier is this? Rellwood Library Management 3 08-06-2021 11:15 PM
mobi-asin - edit identifier question clady Calibre 0 01-22-2017 09:33 AM
AZW3 font size help & Identifier question SampleAndy Conversion 7 10-24-2013 09:20 PM


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


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