Skip to content

Commit 42550e2

Browse files
committed
This adds a epub2mobi conversion rule by use of ebook-convert
It is still a very rough conversion and there are loads of additional tweaking options available. (see `ebook-convert foo.epub foo.mobi -h` to get a list of them displayed). `ebook-convert` is provided by the calibre package which has also been added to the requirements.
1 parent 2627f7f commit 42550e2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
calibre
12
librsvg2-bin
23
texlive-fonts-recommended
34
texlive-latex-recommended

text/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ deploy_js: local_js
7676
# This target builds the PDF and the epub version and pushes them
7777
# out to an S3 bucket
7878

79-
deploy_print: pdf epub
79+
deploy_print: pdf ebook
8080
($(S3PUT) build/latex/ModelicaByExample.pdf s3://files.xogeny.com/ModelicaByExample/)
8181
($(S3PUT) build/epub/ModelicabyExample.epub s3://files.xogeny.com/ModelicaByExample/)
82+
($(S3PUT) build/epub/ModelicabyExample.mobi s3://files.xogeny.com/ModelicaByExample/)
8283

8384

8485

@@ -219,6 +220,13 @@ epub:
219220
@echo
220221
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
221222

223+
mobi: epub
224+
(cd $(BUILDDIR)/epub; ebook-convert ModelicabyExample.epub ModelicabyExample.mobi)
225+
@echo
226+
@echo "Conversion to mobi finished. The mobi file is in $(BUILDDIR)/epub."
227+
228+
ebook: epub mobi
229+
222230
latex: specs results images
223231
$(SPHINXBUILD) -b latex -t latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
224232
@echo

0 commit comments

Comments
 (0)