8000 Calibre meta tags in epub · Issue #322 · aerkalov/ebooklib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Calibre meta tags in epub #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bobbyrward opened this issue Sep 14, 2024 · 1 comment
Open

Calibre meta tags in epub #322

bobbyrward opened this issue Sep 14, 2024 · 1 comment
Labels

Comments

@bobbyrward
Copy link
bobbyrward commented Sep 14, 2024

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"/>
@aerkalov
Copy link
Owner
aerkalov commented May 7, 2025

Interesting. Yeah, ebooklib does not assume you have valid input file so the only options at the moment to do it is parse and then use this code to set metadata in new book:

book.add_metadata(None, 'meta', '', {'name': 'calibre:series', 'content': 'My Series'})

This will give you correct output. Read + Save method is not 100% correct at the moment. That being said, will see how this could be fixed.

@aerkalov aerkalov added the bug label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0