Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2010, 07:37 AM   #1
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
HTML Metadata for use as ePub tags

I've got some text files, in text format, that I am re-formatting as HTML. (Automatic Calibre text->HTML conversion does not retain the proper formatting for music lyrics, and I'll post the awk file here when I'm done.)

When I include <meta name="author" content="foo bar"> in the head of the HTML file, the HTML -> ePub conversion in Calibre picks up the author's name in the Calibre metadata.

I can't quite find a way to include other meta information for use as Calibre tags. 'meta name="keywords"' and the non-standard 'meta name="tags"' both fail. Calibre's manual does not have information that I could find.

So: what is the proper method to include metainfo inside an HTML file for use by Calibre?
myudkowsky is offline   Reply With Quote
Old 12-12-2010, 08:01 AM   #2
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
I should mention that meta "description" does not work either.
myudkowsky is offline   Reply With Quote
Advert
Old 12-12-2010, 10:23 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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sho...44&postcount=9
kovidgoyal is offline   Reply With Quote
Old 12-12-2010, 11:44 AM   #4
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
Thanks for the prompt reply. I've tried adding information as per the list but so far I have not suceeded.

The meta tags Subject, Description, and Type all do not automatically generate Tags for the file when loaded via Calibre.

Example. Here's a few lines from the HTML file I use:

Code:
<META NAME="Subject" CONTENT="Lyrics, Music">
<META NAME="DC.Subject" CONTENT="Lyrics, Music">
<META NAME="DCTERMS.Subject" CONTENT="Lyrics, Music">
I've used all three possible formats for the sake of completeness. I then add this HTML file to Calibre using the GUI. (Note:I have added this HTML file once before and used "Remove Books" to delete it; I include this info in case there's a db-related issue.)

The resulting OPF in the Calibre Library. In the book's folder, I see an OPF file and it does not contain the tags I expect. I should note that if I include, for example, the "Type" metadata in the HTML file, I don't see any "type" metadata in the OPF file. It's as if though it's being ignored entirely.Subju

Other books that I've added tags to using the Calibre UI do have the proper OPF entries:
Code:
 
<dc:subject>Music</dc:subject>
<dc:subject>Lyrics</dc:subject>
So: what am I doing wrong? I'm using 0.7.33.
myudkowsky is offline   Reply With Quote
Old 12-12-2010, 11:49 AM   #5
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://bugs.calibre-ebook.com/ticket/7851
kovidgoyal is offline   Reply With Quote
Advert
Old 12-12-2010, 12:01 PM   #6
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
I've just realized we may be talking a cross-purposed. I'm not trying to create a ZIP file for an ePub; I'm trying to do a simple txt to HTML conversion without going the steps of creating a manifest, separate OPF file, etc. I'd like to know if Calibre can parse "subect" as well as author information from the meta tags.
myudkowsky is offline   Reply With Quote
Old 12-12-2010, 12:02 PM   #7
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
Just seen your latest, checking.
myudkowsky is offline   Reply With Quote
Old 12-12-2010, 12:03 PM   #8
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm confused, if you're trying to convert a txt file to html not using calibre, what does calibre have to do with anything?
kovidgoyal is offline   Reply With Quote
Old 12-12-2010, 12:05 PM   #9
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
Ok, clearly the same bug. Thanks.
myudkowsky is offline   Reply With Quote
Old 12-12-2010, 12:45 PM   #10
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
Sorry to be confusing. I'm trying to convert a text file to pure HTML, and then use Calibre to read that file and eventually convert to ePub.

When I use the "meta" element inside that simple HTML file, Calibre does read and use "author" meta elements, but does not use Subject, Tag, Keyword, etc. meta elements to create Calibre tags.

I'd like to know if any specific meta element is supposed to work inside HTML to create Calibre tags.

The alternative will be to create ZIP files of my own with Manifests, etc.
myudkowsky is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tags and Authors in Metadata cossetter Calibre 8 12-22-2009 08:24 PM
Social metadata\tags DaCrump Calibre 10 11-18-2009 04:18 AM
Wide margins in html to epub; font size mngmt; PDF metadata dementrio Calibre 2 08-01-2009 01:33 AM
Change Metadata tags en masse thibaulthalpern Calibre 1 03-20-2009 07:02 PM
Editing metadata tags thibaulthalpern PDF 9 03-19-2009 04:17 PM


All times are GMT -4. The time now is 01:44 PM.


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