Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2025, 12:18 PM   #1
msttat
Junior Member
msttat began at the beginning.
 
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!)
msttat is offline   Reply With Quote
Old 02-24-2025, 06:53 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,722
Karma: 29711016
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.
BetterRed is offline   Reply With Quote
Old 02-24-2025, 09:56 PM   #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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sh...44&postcount=9
kovidgoyal is offline   Reply With Quote
Old 02-26-2025, 08:42 AM   #4
msttat
Junior Member
msttat began at the beginning.
 
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.
msttat is offline   Reply With Quote
Old 02-26-2025, 10:11 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by msttat View Post
I will probably move to Sigil.
Personally, I use both Sigil and calibre's ebook-editor. They both have features that are not in the other so having both in your toolbox can be useful.
DNSB is offline   Reply With Quote
Old 02-26-2025, 10:28 PM   #6
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: 45,345
Karma: 27182818
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.
kovidgoyal is offline   Reply With Quote
Old 02-26-2025, 10:37 PM   #7
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: 45,345
Karma: 27182818
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>
kovidgoyal is offline   Reply With Quote
Old 02-27-2025, 07:53 AM   #8
msttat
Junior Member
msttat began at the beginning.
 
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.
msttat is offline   Reply With Quote
Reply

Tags
category, editor, import, xhtml


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random characters on one xhtml file after importing. BookieBlue Editor 10 09-01-2023 07:06 AM
dc:date metadata importing from EPUB eevan Library Management 5 09-25-2019 08:34 AM
Creating chapters in xhtml/html ayutheos Sigil 7 10-18-2012 08:35 AM
XHTML to EPUB and MOBI: How to mark up metadata in source document johnstephens Conversion 6 05-23-2012 02:58 PM
Importing metadata when creating epub photoluminations Conversion 2 08-03-2011 06:08 PM


All times are GMT -4. The time now is 09:22 AM.


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