Convert epub to a single page html
Go to file
Richard Wong 617489bc7a
Doc: added a readme
2024-04-28 21:00:42 +09:00
.gitignore Feat: implemented html merging with working links 2024-04-28 20:48:46 +09:00
README.md Doc: added a readme 2024-04-28 21:00:42 +09:00
bs4_approach.ipynb Feat: implemented html merging with working links 2024-04-28 20:48:46 +09:00

README.md

epub to html

This repo contains some sample code to convert an epub to html.

How?

epubs are just a collection of html files.

I unzipped the epub into a folder called "./epub" and then work from there.

I used BeautifulSoup to go through the html files and to merge them.

I also did some structure processing to enable links to work in the single-page html.

Why?

Sometimes you just need a simple single-page html to read your document in the browser.

I realized that there is a surprising lack of tools to merge multiple html files into one with working links.

Upcoming plans

For now I assume that you have to manually unzip the epubs to gain access to the internal html file directory of the epub. I also make no assumptions on the general structure of epubs. I just tested it on a single epub that I had.

Future work will be making the tool more user-friendly by making it a simple binary that just takes an epub file as input.