ebooklib
ebooklib copied to clipboard
Round-tripping an epub strips stylesheet links
If I load an epub whose chapter files have a stylesheet <link>
tag, it gets stripped because the stylesheet is only referenced in self.content
, not self.links
.
This is clearly a bug. It also does not read language
or title
defined in the original HTML.
Also, any <meta>
tags are stripped from the head.
The part with tags is intentional. Library ignores a lot of things and it is up to the user to copy some of the data. It assumes certain directory structure where the static or html files will go. So you need to rewrite url for static files in your document and etc. Same goes for metadata. It is up to the user to copy metadata it wants. This is mainly because it is easier to take what you want rather then copy everything and then fail epubcheck validation because you copied everything.