replace Calibre with kindlegen...cuts container size about in half

This commit is contained in:
2024-09-12 14:42:36 -07:00
parent dd6e0118bd
commit 990bbf44f7
4 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
FROM debian
RUN apt update && apt install -y calibre libcairo2-dev fonts-noto fonts-noto-cjk pipenv && rm -r /var/lib/apt/lists/* && pipenv install cchardet==2.2.0a2 && pipenv install ebookmaker
RUN apt update && apt install -y libcairo2-dev fonts-noto fonts-noto-cjk pipenv && rm -r /var/lib/apt/lists/* && pipenv install cchardet==2.2.0a2 && pipenv install ebookmaker
COPY kindlegen_linux_2.6_i386_v2_9.tar.gz .
RUN tar xf kindlegen_linux_2.6_i386_v2_9.tar.gz kindlegen && mv kindlegen /usr/local/bin/ && rm kindlegen_linux_2.6_i386_v2_9.tar.gz
COPY ebookmaker-config /etc/ebookmaker.conf
ENTRYPOINT ["pipenv", "run", "ebookmaker"]

View File

@@ -8,3 +8,9 @@ source from Project Gutenberg, produce EPUB and Kindle files from the
source, and generate a web interface to make it usable, as it appears that
the Kiwix mirror I've been using up to now is no longer being updated.
Example
-------
This will produce both EPUB and Kindle files, as the EPUB serves as input to kindlegen:
```docker run -it --rm -v /mnt/media/books/gutenberg-mirror/html-src/1/3/135/135-h:/src -v /tmp:/dest cr.gitlab.alfter.us:443/salfter/ebookmaker --make kindle.images --generate_cover --output-dir /dest /src/135-h.htm```

2
ebookmaker-config Normal file
View File

@@ -0,0 +1,2 @@
[PATHS]
mobigen: kindlegen

View File

Binary file not shown.