![]() |
#1 |
Member
![]() Posts: 12
Karma: 10
Join Date: Oct 2009
Location: Melbourne, AU
Device: Kobo,Android
|
![]()
Hi All,
I was wondering if I could get any hints on where to look in order to customize the default metadata. I am not referring to the translation text, but (as an example) on a new file, always including the dc:description tag. I have installed the latest version 1.4.3 but I don't know C programming so I don't know where to look for the 'New file defaults' section. I don't want to "Create a template file and load it for a new e-book" as was suggested to me a while back as that is no harder than adding the entries that I want to include manually. Any help and/or guidance on where to look would be great ![]() |
![]() |
![]() |
![]() |
#2 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 500
Karma: 3498633
Join Date: May 2011
Location: Surrey, UK
Device: Kobo Aura One, Sony PRS 600/650
|
As far as I know (but I'm certainly no expert) the only metadata item required for a valid ePub is the language tag the book is defined as.
In my mind the other important items would be the title of the book and the author. After that it's pretty much up to you what information you want to include. This could be a description of the book, any series information, date of publication, publisher etc. When you say 'New file defaults' I presume you are referring to what the metadata content of a new ePub2 or ePub3 is when using File-New in Sigil? To be honest I'm not sure you can change that, but the developers of Sigil frequent this forum, and are very helpful so I'm sure they will be able to tell you more. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,810
Karma: 6000000
Join Date: Nov 2009
Device: many
|
As Ashjuk pointed out ... dc:description is NOT a required metadata item. Language, Title, Id, Author, (and for epub3 date modified) are the very minimum.
What on earth would you put in a description field for an empty epub that would make any sense? Just use the built in Metadata Editor to add it to the book. There are also some simple standalone tools that you can use to just edit the Metadata of an epub. If an epub2, then Doitsu has a simpler Metadata editor for many beginners to use that can be added as a plugin. Any and all of these are options. Last edited by KevinH; 03-09-2021 at 10:12 AM. |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 12
Karma: 10
Join Date: Oct 2009
Location: Melbourne, AU
Device: Kobo,Android
|
The thing is that on every epub I create, I am adding Author and Description, to every single one, as a result I would like to not go through the (admittedly minor) pain of adding those 2 metadata entries on each new epub file.
I know that they are not required, but for my epub collection they are ![]() I assume that somewhere in the code is either 'create these for new epub's' or 'create these if they don't exist' if I could get a pointer on where that is I can probably work it out ![]() |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,810
Karma: 6000000
Join Date: Nov 2009
Device: many
|
There is no one value for description that makes any sense across different epubs. The description of the book is by definition book specific.
And there is no template used. The dc:description metadata item is not generated at all in any blank epub. If you want to do that, then load an empty epub with that metadata value saved once to start your work on for each new book, Or write a plugin the customizes the opf as you desire. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,810
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Edit:
The opf does in fact use a *hardcoded* empty opf template. See Sigil/src/ResourceObjects/OPFResource.cpp Its would need to be changed in 2 places: TEMPLATE_TEXT (starting near line 63 for epub2) and TEMPLATE3_TEXT (starting near line 107 for epub3). If you know the xml metadata code for what you want (and it differs between epub2 and epub3 for Author metadata), you could hard code it here. But wouldn't be easier to create an empty epub of each type and use the MetaData editor to set what you want and do a file save-as under a new name once. Then load that special empty epub anytime you want to start creating an epub (always using file-save the first time to a new name). And I still have no idea what you could possibly store in any dc:description metadata that would be meaningful across different epubs? And Author is reserved for the creator of the book text not the person who creates the epub, so that would differ as well across your book collection. Better yet ... why not just use Calibre and its ebook Library metadata capabilities to set all of this. Last edited by KevinH; 03-09-2021 at 10:41 PM. |
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 12
Karma: 10
Join Date: Oct 2009
Location: Melbourne, AU
Device: Kobo,Android
|
That was what I was looking for. I know it is silly and only save a few seconds but when I manually create an epub file I always add those values.
I have been able to add the additional tag entries to the New files created, no different to as if I had created them Manually (for example Author is [Author name here]), I just don't have to. I do have reasons for not using the other options but mostly it comes down to convenience for how I create/use the application and create files. Save-As - tried that and it took longer than manually adding the 2 MetaData tags to the file (and I kept overwriting the template file) Calibre messes with the format in ways I don't like much (although I have and do use it) Thanks for the locations as that proved to be exactly that I was looking for ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customizing calibre metadata for generated files | sweth | Recipes | 5 | 08-28-2018 08:09 AM |
Change default colors in "edit metadata" window | wishingstar | Calibre | 7 | 08-06-2017 09:24 PM |
Calibre Portable insists on using default regular expression for metadata info | larryvega | Library Management | 2 | 03-08-2014 07:42 AM |
How do I override default metadata search terms? | DC_Sonoma | Library Management | 2 | 08-10-2012 09:40 AM |
Metadata to specify default language is English? | kjk | ePub | 4 | 06-22-2010 04:05 PM |