May 31, 2022

Convert an HTML webpage into an EPUB file

First download the HTML webpage that you wish to convert into EPUB:

wget https://yctct.com

To convert the HTML file that you’ve just downloaded you can use Pandoc or Calibre.

Using Pandoc.

If you need to install Pandoc; on Trisquel GNU/Linux:

sudo apt-get install pandoc

Then run Pandoc to convert the HTML file into an EPUB file:

pandoc -f html -t epub3 -o output.epub input.html

You can add metadata for EPUB:

pandoc -f html -t epub3 --epub-metadata=metadata.xml -o output.epub input.html

Using Calibre.

If you need to install Calibre; on Trisquel GNU/Linux:

sudo apt install calibre

Then run:

ebook-convert  input.html output.epub

You can receive the next blog post by subscribing to the RSS feed.


command line personal computing pandoc


No affiliates, No Google Analytics, No Facebook Pixel. © 2016-2022. Content is licensed under a CC BY-NC-SA 4.0.