Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2016, 01:36 PM   #1
arthurattwell
Member
arthurattwell is on a distinguished road
 
Posts: 12
Karma: 56
Join Date: Dec 2008
Device: None
Importing metadata in 0.9.4

Great to see the metadata editor being improved in 0.9.4. However, 0.9.4 no longer imports metadata from the HTML as earlier versions did. Is there an equivalent, plugin or workaround to get the same effect?

In my workflow, I have basic metadata in my source HTML <head> like this:

<meta name="DC.Title" content="The Title"/>
<meta name="DC.Language" content="en"/>
<meta name="DC.Creator" content=""/>
<meta name="DC.Publisher" content="Publisher Name"/>
<meta name="DC.Date" content="2016-03-01"/>
<meta name="DC.Identifier" content="978-0-00000-000-0" scheme="ISBN"/>
<meta name="DC.Relation" content="978-0-00000-000-0" scheme="ISBN"/>

If I start assembling an epub by opening an HTML file that has this in the <head>, earlier versions of Sigil import that metadata. This automatic import is a big time saver.
arthurattwell is offline   Reply With Quote
Old 03-15-2016, 01:45 PM   #2
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: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,
I did not disable it, so it should still work. But that said, it only works when you Open an html file *not* by Add Existing. When Add Existing was used with an html file in Sigil previously it was incorrectly overwriting the current ebook metadata set in the opf which was lost. Since very few html files have lots of metadata, this was a poor tradeoff (losing things already set just to add in what was in the html file). That was changed in this release.

So please verify this operation by using Open on an html file to generate a new ebook. The normal html metadata should be read and added to the default empty OPF. If this does not happen, then I must have broken something and will fix it for the next release.

KevinH
KevinH is offline   Reply With Quote
Old 03-15-2016, 02:11 PM   #3
arthurattwell
Member
arthurattwell is on a distinguished road
 
Posts: 12
Karma: 56
Join Date: Dec 2008
Device: None
Thanks for the quick reply, Kevin. I am using Open not Add Existing, and am not getting any imported metadata. I'm attaching a test HTML file here (zipped because the forum upload doesn't allow HTML).

If I'm not missing something and this is a bug, let me know if I should rather log the issue on GitHub.
Attached Files
File Type: zip test-metadata.zip (684 Bytes, 148 views)
arthurattwell is offline   Reply With Quote
Old 03-15-2016, 02:18 PM   #4
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: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
No,
I broke it. A real brain-dead "thinko" on my part. Internally metadata changed from not being dc: prefixed to always being dc: prefixed throughout. I made the mistake of carrying that change into the html based metadata code as well. So it is looking for dc:before the name in the meta which makes no sense given it starts with "DC."

So the following will load the metadata from the Open html but that won't do you much good now.

Code:
<meta name="DC.DC:Title" content="The Title"/>
<meta name="DC.DC:Language" content="en"/>
<meta name="DC.DC:Creator" content=""/>
<meta name="DC.DC:Publisher" content="Publisher Name"/>
<meta name="DC.DC:Date" content="2016-03-01"/>
<meta name="DC.DC:Identifier" content="978-0-00000-000-0" scheme="ISBN"/>
<meta name="DC.DC:Relation" content="978-0-00000-000-0" scheme="ISBN"/>
Sorry about that. I will definitely fix this in the next release. The only workaround is to pre-edit the html page in any text editor and replace "DC." with "DC.DC:" inside the html meta tag then it will import properly.

Thanks for your bug report!

KevinH

Edit: Yes ... please file an official issue on github so I don't forget it. You can simply link to this thread in MR in it if that is simpler.

Last edited by KevinH; 03-15-2016 at 02:24 PM.
KevinH is offline   Reply With Quote
Old 03-15-2016, 02:20 PM   #5
arthurattwell
Member
arthurattwell is on a distinguished road
 
Posts: 12
Karma: 56
Join Date: Dec 2008
Device: None
Thanks, Kevin. Glad it's an easy one to fix! Happy to work around it for now.
arthurattwell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Metadata when Importing???? Woodssi Library Management 4 12-22-2014 10:54 AM
Importing books - getting all metadata parkher Calibre 14 07-02-2013 11:55 AM
Importing metadata from file name alfredoc72 Library Management 0 12-21-2012 02:54 AM
Importing, exporting, and metadata? dkperez Calibre 6 02-15-2012 05:45 PM
Importing - Metadata aquisition Justy Calibre 1 02-05-2010 03:44 PM


All times are GMT -4. The time now is 08:06 AM.


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