aerkalov / ebooklib

Python E-book library for handling books in EPUB2/EPUB3 format -
https://ebooklib.readthedocs.io/
GNU Affero General Public License v3.0
1.49k stars 234 forks source link

Calibre meta tags in epub #322

Open bobbyrward opened 2 months ago

bobbyrward commented 2 months ago

Calibre handles metadata like "series' as meta tags with a name of calibre:series.

Because of the code here, these meta tags get converted into namespaced tags like <calibre:series> assuming the calibre namespace was already in the namespace map.

So if you load an epub that calibre has added these meta tags to and then save the epub, the meta tags are converted.

For an example a tag like this:

<meta name="calibre:series" content="My Series" />

Gets converted to this on save:

 <ns2:series xmlns:ns2="calibre" name="calibre:series" content="My Series"/>