|
|
#1 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Feb 2025
Device: android
|
Importing xhtml metadata when creating epub
Hello,
When I use the calibre editor to convert an xhtml file into a epub, the editor seems to properly interpret some metadata, but not others: Here is the <head> block of my xhtml file: <head> <title>The title of the book</title> <meta name="author" content="The author of the book" /> <meta name="category" content="category1, category2" /> <link rel="stylesheet" type="text/css" href="mybooks.css"/> </head> The editor properly sets the author and the booktitle in the epub 'content.opf' file, imports the 'mybooks.css'. But I have not figured out how to specify categories that will be interpreted and imported in the epub content.opf as DublinCore (<dc:subject>category1, category2</dc:suject>), allowing me to find them when I import the epub in the main calibre program. I hope I am not polluting the forum with a question alerady solved, which I was unable to find. Thank you all for any advice (or telling me such feature is not available in the editor!) |
|
|
|
|
|
#2 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,022
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Try changing the <meta name="category" to <meta name="subject"
With luck they'll turn up as Tags when you add the EPUB to the library manager. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Feb 2025
Device: android
|
Thank you for your answers, useful and not:
- USEFUL: I did not know about Sigil. I've trid it and it does the job, importing my <meta.. /> in the epub manifest properly. Thanks, that's great. - And not: I used to work with Calibre (7.26), creating my epub by opening my xhtml file with the Edit-ebook program which is part of the Calibre suite. I have tried the different specs of the <meta /> line without success: Neither <meta name="Subject" content="keyword"/> or <meta name="DC.subject content ="keyword"/> or <meta name="DCTERMS.subject" content="keyword"/> are recognized on input. I will probably move to Sigil. |
|
|
|
|
|
#5 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,197
Karma: 174315444
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add your HTML file to *calibre* first, it will read all your metadata and create the book record directly.
|
|
|
|
|
|
#7 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Actually, I just tried at and it works directly with the editor too.
Code:
<!DOCTYPE html>
<html>
<head>
<title>metadata title</title>
<meta name="Author" content="NAME" />
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="tags" content="categort1, category2" />
</head>
<body>
</body>
</html>
|
|
|
|
|
|
#8 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Feb 2025
Device: android
|
Thank you again, especially for the last Kovid Goyal answer.
<meta name="tags" content="some,thing"/> (where "tags" for calibre editor stands for "Subject" for Sigil). This closes the thread for me at least. |
|
|
|
![]() |
| Tags |
| category, editor, import, xhtml |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Random characters on one xhtml file after importing. | BookieBlue | Editor | 10 | 09-01-2023 08:06 AM |
| dc:date metadata importing from EPUB | eevan | Library Management | 5 | 09-25-2019 09:34 AM |
| Creating chapters in xhtml/html | ayutheos | Sigil | 7 | 10-18-2012 09:35 AM |
| XHTML to EPUB and MOBI: How to mark up metadata in source document | johnstephens | Conversion | 6 | 05-23-2012 03:58 PM |
| Importing metadata when creating epub | photoluminations | Conversion | 2 | 08-03-2011 07:08 PM |