Skip to content

Using Ebooklib in Django project, so links in book are not working #330

@leonfitz

Description

@leonfitz

Hi,
I'm using Ebooklib inside a Django project, i.e. extracting ITEM_DOCUMENT and ITEM_STYLE from a given epub file and displaying the styled xhtml content in the browser. This works great, but any links inside the epub document (to images in a folder, or to chapters) don't work, obviously, because the url clashes with the django url.

I'm thinking about solutions, and I'm wondering if there was an easier solution than filtering the whole xhtml content of the ebook with regular expressions and modifying the links so the root is the epub folder and not the Django url. Is there a built-in function in ebooklib to extract links?

This isn't actually an issue of ebooklib, I hope it's ok to ask about it here. Amazing project, thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoNeeds more info from the reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions