published under license CC-BY
posted in category Systems Software / Sphinx
posted at 23. Apr '25
Howto Generate ePub from Sphinx Documentation
Sometimes there is online documentation of a software, but there is not any ePub format to download. Which sucks, because I need to read manuals in silent and preferably in a laying position putting it in my phone or ebook reader.
Like LibreCAD documentation https://docs.librecad.org/en/2.2.0_a/.
Fortunately the documentation uses Sphinx written in Python and I was able to generate it myself.
Install Sphinx:
apt-get install python3-sphinx sphinx-doc sphinx-common
Clone the repository:
git clone https://github.com/LibreCAD/docs
Generate ePub file:
cd docs
make epub
Running Sphinx v8.1.3
loading translations [en]... done
Converting `source_suffix = ['.rst', '.md']` to `source_suffix = {'.rst': 'restructuredtext', '.md': 'restructuredtext'}`.
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [epub]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
reading sources...
looking for now-outdated files... none found
no targets are out of date.
build succeeded.
The ePub file is in _build/epub.
And the ePub file is in _build/epub/LibreCAD.epub.
Fortunately this went quite easily.
Add Comment