gnu: calibre: Add missing python-pycryptodome dependency.
[jackhill/guix/guix.git] / gnu / packages / ebook.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2017, 2019, 2020, 2021 Brendan Tildesley <mail@brendan.scot>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
9 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
10 ;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
11 ;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
12 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
13 ;;; Copyright © 2021 Mathieu Laparie <mlaparie@disr.it>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages ebook)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix utils)
35 #:use-module (guix gexp)
36 #:use-module (guix git-download)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system meson)
40 #:use-module (guix build-system python)
41 #:use-module (guix build-system qt)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages file)
49 #:use-module (gnu packages fonts)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages fribidi)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gstreamer)
59 #:use-module (gnu packages icu4c)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages javascript)
62 #:use-module (gnu packages language)
63 #:use-module (gnu packages libusb)
64 #:use-module (gnu packages libreoffice)
65 #:use-module (gnu packages music)
66 #:use-module (gnu packages pantheon)
67 #:use-module (gnu packages pdf)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-build)
71 #:use-module (gnu packages python-compression)
72 #:use-module (gnu packages python-crypto)
73 #:use-module (gnu packages python-web)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages serialization)
77 #:use-module (gnu packages speech)
78 #:use-module (gnu packages sqlite)
79 #:use-module (gnu packages time)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages web)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xorg)
84 #:use-module (gnu packages wxwidgets))
85
86 (define-public chmlib
87 (package
88 (name "chmlib")
89 (version "0.40")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "http://www.jedrea.com/chmlib/chmlib-"
93 version ".tar.bz2"))
94 (sha256
95 (base32
96 "18zzb4x3z0d7fjh1x5439bs62dmgsi4c1pg3qyr7h5gp1i5xcj9l"))
97 (patches (search-patches "chmlib-inttypes.patch"))))
98 (build-system gnu-build-system)
99 (home-page "http://www.jedrea.com/chmlib/")
100 (synopsis "Library for CHM files")
101 (description "CHMLIB is a library for dealing with ITSS/CHM format files.")
102 (license license:lgpl2.1+)))
103
104 (define-public python-pychm
105 (package
106 (name "python-pychm")
107 (version "0.8.6")
108 (source
109 (origin
110 (method url-fetch)
111 (uri (pypi-uri "pychm" version))
112 (sha256
113 (base32
114 "0wpn9ijlsmrpyiwg3drmgz4dms1i1i347adgqw37bkrh3vn6yq16"))))
115 (build-system python-build-system)
116 (inputs
117 (list chmlib))
118 (home-page "https://github.com/dottedmag/pychm")
119 (synopsis "Handle CHM files")
120 (description "This package provides a Python module for interacting
121 with Microsoft Compiled HTML (CHM) files")
122 (license license:gpl2+)))
123
124 (define-public calibre
125 (package
126 (name "calibre")
127 (version "5.36.0")
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "http://download.calibre-ebook.com/"
132 version "/calibre-"
133 version ".tar.xz"))
134 (sha256
135 (base32
136 "1c036qmn7lxq0899c2xzzs6whz7z0557frnfqisbvfxa13b2sadk"))
137 (modules '((guix build utils)))
138 (snippet
139 '(begin
140 ;; Unbundle python2-odfpy.
141 (delete-file-recursively "src/odf")
142 ;; Disable test that attempts to load it.
143 (substitute* "setup/test.py"
144 ((".*SRC, 'odf'.*") ""))
145 ;; Remove unneeded resources.
146 (delete-file "resources/mozilla-ca-certs.pem")
147 (delete-file "resources/calibre-portable.bat")
148 (delete-file "resources/calibre-portable.sh")))
149 (patches (search-patches "calibre-no-updates-dialog.patch"
150 "calibre-remove-test-sqlite.patch" ; TODO: fix test.
151 "calibre-remove-test-unrar.patch"))))
152 (build-system python-build-system)
153 (native-inputs
154 (list bash-minimal
155 pkg-config
156 python-flake8
157 python-pyqt-builder
158 qtbase-5 ; for qmake
159 xdg-utils))
160 (inputs
161 (list fontconfig
162 font-liberation
163 glib
164 hunspell
165 hyphen
166 icu4c
167 libmtp
168 libpng
169 libjpeg-turbo
170 libjxr
171 libstemmer
172 libusb
173 openssl
174 optipng
175 podofo
176 poppler
177 python-apsw
178 python-beautifulsoup4
179 python-cchardet
180 python-css-parser
181 python-cssselect
182 python-dateutil
183 python-dnspython-1.16
184 python-feedparser
185 python-html2text
186 python-html5-parser
187 python-html5lib
188 python-jeepney
189 python-lxml
190 python-markdown
191 python-mechanize
192 ;; python-msgpack is needed for the network content server to work.
193 python-msgpack
194 python-netifaces
195 python-odfpy
196 python-pillow
197 python-psutil
198 python-py7zr
199 python-pychm
200 python-pycryptodome
201 python-pygments
202 python-pyqt-without-qtwebkit
203 python-pyqtwebengine
204 python-regex
205 speech-dispatcher
206 python-zeroconf
207 qtwebengine-5
208 sqlite))
209 (arguments
210 (list
211 ;; Calibre is using setuptools by itself, but the setup.py is not
212 ;; compatible with the shim wrapper (taken from pip) we are using.
213 #:use-setuptools? #f
214 #:phases
215 #~(modify-phases %standard-phases
216 (add-after 'unpack 'patch-source
217 (lambda _
218 (substitute* "src/calibre/linux.py"
219 ;; We can't use the uninstaller in Guix. Don't build it.
220 (("self\\.create_uninstaller()") ""))))
221 (add-after 'patch-source-shebangs 'patch-more-shebangs
222 (lambda* (#:key inputs native-inputs #:allow-other-keys)
223 ;; Patch various inline shebangs.
224 (substitute* '("src/calibre/gui2/preferences/tweaks.py"
225 "src/calibre/gui2/dialogs/custom_recipes.py"
226 "setup/install.py"
227 "setup/linux-installer.sh")
228 (("#!/usr/bin/env python")
229 (string-append "#!" (search-input-file inputs "/bin/python")))
230 (("#!/bin/sh")
231 (string-append "#!"
232 (search-input-file native-inputs "/bin/sh"))))))
233 (add-after 'unpack 'dont-load-remote-icons
234 (lambda _
235 (substitute* "setup/plugins_mirror.py"
236 (("href=\"//calibre-ebook.com/favicon.ico\"")
237 "href=\"favicon.ico\""))))
238 (add-before 'build 'configure
239 (lambda* (#:key inputs #:allow-other-keys)
240 (substitute* "setup/build.py"
241 (("\\[tool.sip.bindings.pictureflow\\]")
242 "[tool.sip.bindings.pictureflow]
243 tags = [\"WS_X11\"]")
244 (("\\[tool.sip.project\\]")
245 (string-append "[tool.sip.project]
246 sip-include-dirs = [\""
247 #$(this-package-input
248 "python-pyqt-without-qtwebkit")
249 "/share/sip\"]")))
250 (substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
251 (("PDFTOHTML = 'pdftohtml'")
252 (string-append "PDFTOHTML = \""
253 (search-input-file inputs "/bin/pdftohtml")
254 "\"")))
255 ;; get_exe_path looks in poppler's output for these
256 ;; binaries. Make it not do that.
257 (substitute* "src/calibre/utils/img.py"
258 (("get_exe_path..jpegtran..")
259 (string-append "'"
260 (search-input-file inputs "/bin/jpegtran")
261 "'"))
262 (("get_exe_path..cjpeg..")
263 (string-append "'"
264 (search-input-file inputs "/bin/cjpeg")
265 "'"))
266 (("get_exe_path..optipng..")
267 (string-append "'"
268 (search-input-file inputs "/bin/optipng")
269 "'"))
270 (("get_exe_path..JxrDecApp..")
271 (string-append "'"
272 (search-input-file inputs "/bin/JxrDecApp")
273 "'")))
274 ;; Calibre thinks we are installing desktop files into a home
275 ;; directory, but here we butcher the script in to installing
276 ;; to calibres /share directory.
277 (setenv "XDG_DATA_HOME" (string-append #$output "/share"))
278 (substitute* "src/calibre/linux.py"
279 (("'~/.local/share'") "''"))
280 ;; 'python setup.py rapydscript' uses QtWebEngine, which
281 ;; needs to create temporary files in $HOME.
282 (setenv "HOME" "/tmp")
283 ;; XXX: QtWebEngine will fail if no fonts are available. This
284 ;; can likely be removed when fontconfig has been patched to
285 ;; include TrueType fonts by default.
286 (symlink (string-append #$(this-package-input "font-liberation")
287 "/share/fonts")
288 "/tmp/.fonts")
289 (let ((podofo #$(this-package-input "podofo")))
290 (setenv "PODOFO_INC_DIR"
291 (string-append podofo "/include/podofo"))
292 (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))
293 ;; This informs the tests we are a continuous integration
294 ;; environment and thus have no networking.
295 (setenv "CI" "true")
296 ;; The Qt test complains about being unable to load all image
297 ;; plugins, and I notice the available plugins list it shows
298 ;; lacks 'svg'. Adding qtsvg-5 doesn't fix it, so I'm not sure how
299 ;; to fix it. TODO: Fix test and remove this.
300 (setenv "SKIP_QT_BUILD_TEST" "true")))
301 (add-after 'install 'install-rapydscript
302 (lambda _
303 ;; Unset so QtWebengine doesn't dump temporary files here.
304 (unsetenv "XDG_DATA_HOME")
305 (invoke "python" "setup.py" "rapydscript")))
306 (add-after 'install 'install-man-pages
307 (lambda _
308 (copy-recursively "man-pages"
309 (string-append #$output "/share/man"))))
310 ;; The font TTF files are used in some miscellaneous tests, so we
311 ;; unbundle them here to avoid patching the tests.
312 (add-after 'install 'unbundle-font-liberation
313 (lambda _
314 (let ((font-dest
315 (string-append #$output "/share/calibre/fonts/liberation"))
316 (font-src
317 (string-append #$(this-package-input "font-liberation")
318 "/share/fonts/truetype")))
319 (delete-file-recursively font-dest)
320 (symlink font-src font-dest))))
321 ;; Make run-time dependencies available to the binaries.
322 (add-after 'wrap 'wrap-program
323 (lambda* (#:key inputs #:allow-other-keys)
324 (with-directory-excursion (string-append #$output "/bin")
325 (for-each
326 (lambda (binary)
327 (wrap-program binary
328 ;; Make QtWebEngineProcess available.
329 `("QTWEBENGINEPROCESS_PATH" =
330 ,(list
331 (search-input-file
332 inputs "/lib/qt5/libexec/QtWebEngineProcess")))))
333 ;; Wrap all the binaries shipping with the package, except
334 ;; for the wrappings created during the 'wrap standard
335 ;; phase. This extends existing .calibre-real wrappers
336 ;; rather than create ..calibre-real-real-s. For more
337 ;; information see: https://issues.guix.gnu.org/43249.
338 (find-files "." (lambda (file stat)
339 (not (wrapped-program? file)))))))))))
340 (home-page "https://calibre-ebook.com/")
341 (synopsis "E-book library management software")
342 (description "Calibre is an e-book library manager. It can view, convert
343 and catalog e-books in most of the major e-book formats. It can also talk
344 to many e-book reader devices. It can go out to the Internet and fetch
345 metadata for books. It can download newspapers and convert them into
346 e-books for convenient reading.")
347 ;; Calibre is largely GPL3+, but includes a number of components covered
348 ;; by other licenses. See COPYRIGHT for more details.
349 (license (list license:gpl3+
350 license:gpl2+
351 license:lgpl2.1+
352 license:lgpl2.1
353 license:bsd-3
354 license:expat
355 license:zpl2.1
356 license:asl2.0
357 license:public-domain
358 license:silofl1.1
359 license:cc-by-sa3.0))))
360
361 (define-public ebook-tools
362 (package
363 (name "ebook-tools")
364 (version "0.2.2")
365 (source
366 (origin
367 (method url-fetch)
368 (uri (string-append "mirror://sourceforge/ebook-tools/ebook-tools/"
369 version "/ebook-tools-" version ".tar.gz"))
370 (sha256
371 (base32
372 "1bi7wsz3p5slb43kj7lgb3r6lb91lvb6ldi556k4y50ix6b5khyb"))))
373 (arguments
374 `(#:tests? #f)) ; No 'test' target
375 (build-system cmake-build-system)
376 (native-inputs
377 (list pkg-config))
378 (inputs
379 (list libzip libxml2))
380 (home-page "http://ebook-tools.sourceforge.net")
381 (synopsis "Tools and library for dealing with various ebook file formats")
382 (description "This package provides command-line tools and a library for
383 accessing and converting various ebook file formats.")
384 (license license:expat)))
385
386 (define-public inkbox
387 (package
388 (name "inkbox")
389 (version "1.7")
390 (home-page "https://github.com/Kobo-InkBox/inkbox")
391 (source
392 (origin
393 (method git-fetch)
394 (uri
395 (git-reference
396 (url home-page)
397 (commit version)))
398 (file-name (git-file-name name version))
399 (sha256
400 (base32 "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
401 (build-system qt-build-system)
402 (arguments
403 (list
404 #:tests? #f ; no test suite
405 #:make-flags
406 #~(list (string-append "PREFIX=" #$output))
407 #:phases
408 #~(modify-phases %standard-phases
409 (add-after 'unpack 'prefix-opt
410 (lambda _
411 (substitute* "inkbox.pro"
412 (("/opt/\\$\\$\\{TARGET\\}")
413 #$output))))
414 (replace 'configure
415 (lambda* (#:key make-flags #:allow-other-keys)
416 (apply invoke (cons "qmake" make-flags)))))))
417 (native-inputs
418 (list qtbase-5))
419 (synopsis "EBook reader")
420 (description "This package provides InkBox eBook reader.")
421 (license license:gpl3)))
422
423 (define-public liblinebreak
424 (package
425 (name "liblinebreak")
426 (version "2.1")
427 (source (origin
428 (method url-fetch)
429 (uri (string-append "mirror://sourceforge/vimgadgets"
430 "/liblinebreak/" version
431 "/liblinebreak-" version ".tar.gz"))
432 (sha256
433 (base32
434 "1f36dbq7nc77lln1by2n1yl050g9dc63viawhs3gc3169mavm36x"))))
435 (build-system gnu-build-system)
436 (home-page "http://vimgadgets.sourceforge.net/liblinebreak/")
437 (synopsis "Library for detecting where linebreaks are allowed in text")
438 (description "@code{liblinebreak} is an implementation of the line
439 breaking algorithm as described in Unicode 6.0.0 Standard Annex 14,
440 Revision 26. It breaks lines that contain Unicode characters. It is
441 designed to be used in a generic text renderer.")
442 (license license:zlib)))
443
444 (define-public fbreader
445 (package
446 (name "fbreader")
447 (version "0.99.6")
448 (source (origin
449 (method git-fetch)
450 (uri (git-reference
451 (url "https://github.com/geometer/FBReader")
452 (commit (string-append version "-freebsdport"))))
453 (file-name (git-file-name name version))
454 (sha256
455 (base32
456 "0c0s4silpax74kwfz3dfmzn4lkv6jsyb800vfak166vii0hvbv3d"))
457 (patches (search-patches "fbreader-curl-7.62.patch"))))
458 (build-system gnu-build-system)
459 (inputs
460 `(("curl" ,curl)
461 ("expat" ,expat)
462 ("fribidi" ,fribidi)
463 ("glib" ,glib)
464 ("gtk+-2" ,gtk+-2)
465 ("libjpeg" ,libjpeg-turbo)
466 ("liblinebreak" ,liblinebreak)
467 ("libxft" ,libxft)
468 ("sqlite" ,sqlite)
469 ("zlib" ,zlib)))
470 (native-inputs
471 `(("gcc@5" ,gcc-5)
472 ("pkg-config" ,pkg-config)))
473 (arguments
474 `(#:tests? #f ; No tests exist.
475 #:make-flags `("CC=gcc" "TARGET_ARCH=desktop" "UI_TYPE=gtk"
476 "TARGET_STATUS=release"
477 ,(string-append "INSTALLDIR="
478 (assoc-ref %outputs "out"))
479 ,(string-append "LDFLAGS=-Wl,-rpath="
480 (assoc-ref %outputs "out") "/lib"))
481 #:phases
482 (modify-phases %standard-phases
483 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
484 (lambda* (#:key inputs #:allow-other-keys)
485 ;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent a header
486 ;; conflict with the GCC provided in native-inputs.
487 (let ((gcc (assoc-ref inputs "gcc")))
488 (setenv "CPLUS_INCLUDE_PATH"
489 (string-join
490 (delete (string-append gcc "/include/c++")
491 (string-split (getenv "CPLUS_INCLUDE_PATH")
492 #\:))
493 ":"))
494 #t)))
495 (delete 'configure)
496 (add-after 'unpack 'fix-install-locations
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let ((out (assoc-ref outputs "out")))
499 (substitute* "fbreader/desktop/Makefile"
500 (("/usr") out))
501 #t))))))
502 (home-page "https://fbreader.org/")
503 (synopsis "E-Book reader")
504 (description "@code{fbreader} is an E-Book reader. It supports the
505 following formats:
506
507 @enumerate
508 @item CHM
509 @item Docbook
510 @item FB2
511 @item HTML
512 @item OEB
513 @item PDB
514 @item RTF
515 @item TCR
516 @item TXT
517 @item XHTML
518 @end enumerate")
519 (license license:gpl2+)))
520
521 (define-public cozy
522 (package
523 (name "cozy")
524 (version "1.2.1")
525 (source
526 (origin
527 (method git-fetch)
528 (uri (git-reference
529 (url "https://github.com/geigi/cozy")
530 (commit version)))
531 (file-name (git-file-name name version))
532 (sha256
533 (base32 "0qky885fl63d5ih5d3rggm8rhp00sk6lny26qljyz3gga8n9y6ki"))))
534 (build-system meson-build-system)
535 (arguments
536 `(#:glib-or-gtk? #t
537 #:phases
538 (modify-phases %standard-phases
539 (add-after 'unpack 'patch-desktop-file
540 (lambda _
541 (substitute* "data/com.github.geigi.cozy.desktop"
542 (("Exec=com.github.geigi.cozy") "Exec=cozy"))))
543 (add-after 'install 'patch-executable-name
544 (lambda* (#:key outputs #:allow-other-keys)
545 (with-directory-excursion
546 (string-append (assoc-ref outputs "out") "/bin")
547 (rename-file "com.github.geigi.cozy" "cozy"))))
548 (add-after 'wrap 'wrap-libs
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (pylib (string-append
552 out "/lib/python"
553 ,(version-major+minor
554 (package-version python))
555 "/site-packages"))
556 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
557 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
558 (libmagic-path (string-append
559 (assoc-ref %build-inputs "file")
560 "/lib"))
561 (python-path (getenv "GUIX_PYTHONPATH")))
562 (wrap-program (string-append out "/bin/cozy")
563 `("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
564 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
565 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
566 `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
567 (native-inputs
568 (list desktop-file-utils
569 gettext-minimal
570 `(,glib "bin")
571 gobject-introspection
572 `(,gtk+ "bin")
573 pkg-config
574 python-wrapper))
575 (inputs
576 (list bash-minimal
577 file
578 granite
579 gsettings-desktop-schemas
580 gst-libav
581 gst-plugins-bad
582 gst-plugins-good
583 gst-plugins-ugly
584 gtk+
585 libdazzle
586 libgee
587 libhandy
588 python-distro
589 python-gst
590 python-mutagen
591 python-packaging
592 python-peewee
593 python-pycairo
594 python-pygobject
595 python-pytz
596 python-requests))
597 (home-page "https://cozy.geigi.de/")
598 (synopsis "Modern audiobook player using GTK+")
599 (description
600 "Cozy is a modern audiobook player written in GTK+.
601
602 Some of the current features:
603
604 @itemize
605 @item Import your audiobooks into Cozy to browse them comfortably
606 @item Sort your audio books by author, reader & name
607 @item Remembers your playback position
608 @item Sleep timer
609 @item Playback speed control
610 @item Search your library
611 @item Offline mode
612 @item Add multiple storage locations
613 @item Drag & Drop to import new audio books
614 @item Support for DRM free mp3, m4a (aac, ALAC, …), flac, ogg, opus, wav files
615 @item Mpris integration (Media keys & playback info for desktop environment)
616 @end itemize")
617 ;; TODO: Unbundle python-inject.
618 (license (list license:gpl3+ ;cozy
619 license:asl2.0)))) ;python-inject (bundled dependency)
620
621 (define-public xchm
622 (package
623 (name "xchm")
624 (version "1.33")
625 (source (origin
626 (method url-fetch)
627 (uri (string-append "https://github.com/rzvncj/xCHM"
628 "/releases/download/"
629 version "/xchm-" version ".tar.gz"))
630 (sha256
631 (base32
632 "0an09shap2wj9gzj5fsw5sc2i6paq3kc3mc52fnwg2bb2dan5qxk"))))
633 (build-system gnu-build-system)
634 (inputs
635 (list wxwidgets chmlib))
636 (native-inputs
637 (list pkg-config))
638 (home-page "https://github.com/rzvncj/xCHM")
639 (synopsis "CHM file viewer")
640 (description "xCHM is a graphical CHM file viewer. It is a frontend to
641 the CHM library CHMLIB.")
642 (license license:gpl2+)))
643
644 (define-public libmobi
645 (package
646 (name "libmobi")
647 (version "0.6")
648 (source (origin
649 (method git-fetch)
650 (uri (git-reference
651 (url "https://github.com/bfabiszewski/libmobi/")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
654 (sha256
655 (base32
656 "0yps72cm609xn2k7alflkdhp9kgr1w7zzyxjygz0n1kqrdcplihh"))))
657 (build-system gnu-build-system)
658 (native-inputs
659 (list autoconf automake libtool))
660 (inputs
661 (list zlib libxml2))
662 (home-page "https://github.com/bfabiszewski/libmobi/")
663 (synopsis "C library for handling MOBI formats")
664 (description "Libmobi is a C library for handling MOBI ebook
665 format documents, with the following features:
666
667 @itemize
668 @item reading and parsing:
669 @itemize
670 @item some older text Palmdoc formats (pdb),
671 @item Mobipocket files (prc, mobi),
672 @item newer MOBI files including KF8 format (azw, azw3),
673 @item Replica Print files (azw4)
674 @end itemize
675 @item recreating source files using indices
676 @item reconstructing references (links and embedded) in html files
677 @item reconstructing source structure that can be fed back to kindlegen
678 @item reconstructing dictionary markup (orth, infl tags)
679 @item writing back loaded documents
680 @item metadata editing
681 @item handling encrypted documents
682 @end itemize\n")
683 (license license:lgpl3+)))
684
685 (define-public python-ebooklib
686 (package
687 (name "python-ebooklib")
688 (version "0.17.1")
689 (source (origin
690 (method url-fetch)
691 (uri (pypi-uri "EbookLib" version))
692 (sha256
693 (base32
694 "1w972g0kmh9cdxf3kjr7v4k99wvv4lxv3rxkip39c08550nf48zy"))))
695 (build-system python-build-system)
696 (propagated-inputs (list python-lxml python-six))
697 (home-page "https://github.com/aerkalov/ebooklib")
698 (synopsis "Ebook library which can handle EPUB2/EPUB3 and Kindle format")
699 (description
700 "Ebook library which can handle EPUB2/EPUB3 and Kindle format.")
701 (license license:agpl3+)))
702
703 (define-public shirah
704 (package
705 (name "shirah")
706 (version "1.0.0")
707 (source (origin
708 (method url-fetch)
709 (uri (pypi-uri "shirah_reader" version))
710 (sha256
711 (base32
712 "0j15v435lz68c1mj5clfx5dmfyjc6jvvz2q8hqvv799mb2faj42y"))))
713 (build-system python-build-system)
714 (propagated-inputs (list python-beautifulsoup4 python-ebooklib
715 python-syllables python-termcolor))
716 (home-page "https://github.com/hallicopter/shirah-reader")
717 (synopsis "Terminal ebook reader with an optional RSVP mode")
718 (description
719 "@command{shirah} is a curses based terminal ebook reader that can
720 display ebooks in the usual way or with Rapid Serial Visual Presentation, a
721 method to enable speedreading by showing the text word by word at configurable
722 speeds.")
723 (license license:gpl2+)))