Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2019, 07:22 AM   #1
eevan
Junior Member
eevan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Location: Belgrade, Serbia
Device: Kobo Glo
dc:date metadata importing from EPUB

I know there's been a lot discussion regarding published date meatadata.

But I haven't found an answer to this.
I author my EPUB books in Sigil. Here is an extract of the date metadata from opf file inside the EPUB:

Code:
<dc:date opf:event="publication">1995-03-23</dc:date>
<dc:date opf:event="creation">1967-05-08</dc:date>
So, I have created two date fileds that have the following meaning:
publication: date of the publication of this edition (translation)
creation: date of the publication of original book.

When I import this book in Calibre, pubdate field gets the value from <dc:date opf:event="creation"> (May 1967).

Is there a way to control which date gets mapped to pubdate?
Or a way to import this "creation" date into some user defined field (column).

Otherwise one has to manually change the pubdate to other value.
eevan is offline   Reply With Quote
Old 09-20-2019, 09:23 AM   #2
thiago.eec
Groupie
thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.
 
Posts: 179
Karma: 71602
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
According to the specs, we have this:
Quote:
The date element has one optional OPF event attribute. The set of values for event are not defined by this specification; possible values may include: creation, publication, and modification.
Readium uses it like this:

Quote:
EPUB 2.x
The string is the value of the <dc:date> element whose opf:event attribute has the value publication.

EPUB 3.x
The string is the value of the <dc:date> element.
Calibre, on the other hand, seems to ignore altogether the opf:event property. It just uses the oldest date, regardless of its attribute.

Last edited by thiago.eec; 09-20-2019 at 09:39 AM. Reason: typo
thiago.eec is online now   Reply With Quote
Old 09-21-2019, 08:26 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,283
Karma: 12711906
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Calibre will basically consider only one DC:date you can put dates into Calibre custom columns the easiest way to do so is to add the date to Calibre and then use save to disk to see how Calibre saves the matadata in the exported epub. Use the same technique in your epubs
kovidgoyal is online now   Reply With Quote
Old 09-22-2019, 12:43 PM   #4
eevan
Junior Member
eevan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Location: Belgrade, Serbia
Device: Kobo Glo
Thanks a lot for clarification guys!
eevan is offline   Reply With Quote
Old 09-24-2019, 01:38 PM   #5
eevan
Junior Member
eevan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Location: Belgrade, Serbia
Device: Kobo Glo
OK, I have tried. Created a custom column named #original.
Filled it with date, and saved EPUB to disk. The resulting meta tag in the EPUB is a bit impractical for use, because it's content is a long JSON string with a full description of a custom column, not just the date value. It is just one line of course, I have broken it just for better display in a code block.

Code:
<meta name="calibre:user_metadata:#original" content="{&quot;link_column&quot;:
&quot;value&quot;, &quot;is_multiple2&quot;: {}, 
&quot;search_terms&quot;: [&quot;#original&quot;], 
&quot;is_csp&quot;: false, &quot;rec_index&quot;: 22,
 &quot;column&quot;: &quot;value&quot;, 
&quot;datatype&quot;: &quot;datetime&quot;, 
&quot;label&quot;: &quot;original&quot;, 
&quot;name&quot;: &quot;Originaly published&quot;, 
&quot;kind&quot;: &quot;field&quot;, 
&quot;is_custom&quot;: true, &quot;is_category&quot;: false,
&quot;#extra#&quot;: null, &quot;is_editable&quot;: true, 
&quot;display&quot;: {&quot;description&quot;: 
&quot;Date of original publishing&quot;, &quot;date_format&quot;: 
&quot;dd.MM.yyyy.&quot;}, &quot;is_multiple&quot;: null, 
&quot;table&quot;: &quot;custom_column_4&quot;, 
&quot;category_sort&quot;: &quot;value&quot;, 
&quot;#value#&quot;: null, &quot;colnum&quot;: 4}"/>
But thanks anyway for your help!
eevan is offline   Reply With Quote
Old 09-25-2019, 08:34 AM   #6
thiago.eec
Groupie
thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.thiago.eec knows who John Galt is.
 
Posts: 179
Karma: 71602
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Hi, eevan.

Looks like you didn't put any value on the custom field before saving it, right? If you had, there would be a date there on the #value# attribute, like this:

Code:
&quot;#value#&quot;: {&quot;__value__&quot;: &quot;2019-09-25T12:31:45.812000+00:00&quot;, &quot;__class__&quot;: &quot;datetime.datetime&quot;}
The full date set in this example is the bold text. If you edit this on your files BEFORE adding to calibre, it will be imported automatically to the #original column.
thiago.eec is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What date is used in the 'Date' field of CC Metadata window? ShaunBlake Library Management 2 06-18-2019 05:32 PM
Importing Books: Getting date from file attributes ownedbycats Library Management 3 11-09-2018 05:59 PM
Edit metadata publish date for a date BC RickLeFeuvre Calibre 2 08-28-2014 11:53 PM
Importing Books RESETS Date! paralion Library Management 1 03-25-2012 12:53 AM
Importing metadata when creating epub photoluminations Conversion 2 08-03-2011 06:08 PM


All times are GMT -4. The time now is 09:20 PM.


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