From 71b070340792ecc62bb6f90b872e93bb83c13cf54ed49fbb4735a780b5c6426b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 07:39:58 +0000 Subject: [PATCH 1/3] - Update to version 2021.10.23+git.1641627031.7bd659d: * .mkpkg -> Makefile * Patch PKGBUILD - Update to version 2021.10.23+git.1641622438.69c2f80: * Hotfix: curses has no attrib window in termux * Added default color config * Added PKGBUILD for Arch * Adjust setup.py and pyproject.toml to include epy_extras * Cleanup on failed ebook initialization * Initial prepackaging kindleunpack with epy * Use setuptools as setup backend instead of poetry * Update version and README.md * Change history matching key from filepath to title author * Initial library implementation * Always calculate reading_progress whenever possible, just not always shown * Refactor attribute name * Fixed book metadata * Add (sup|sub)script lookup table * Implement HTMLtoLines._group_spans_by_row() * Hotfix: adjust starting_line for inline style * Add text mark/span grouper method * Initial refactor: inline styling * Add ipdb dev dependency * Hotfix: Skip adding toc entry for empty label name * Update development env using poetry * Fix path resolver for Mobi.get_img_bytstr() * Add tests * Add requirements-dev.txt * Add support for Epub==v1.0 and simplify path resolver OBS-URL: https://build.opensuse.org/package/show/Education/epy?expand=0&rev=9 --- _servicedata | 4 + epy-2021.10.23+git.1641627031.7bd659d.tar.gz | 3 + epy.changes | 48 ++++++++++ epy.spec | 10 +-- mimic.patch | 93 -------------------- 5 files changed, 60 insertions(+), 98 deletions(-) create mode 100644 _servicedata create mode 100644 epy-2021.10.23+git.1641627031.7bd659d.tar.gz delete mode 100644 mimic.patch diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..0d0f995 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/wustho/epy.git + 7bd659d5b9d42ed5e7a1b0a8ceb54bf24ec7e117 \ No newline at end of file diff --git a/epy-2021.10.23+git.1641627031.7bd659d.tar.gz b/epy-2021.10.23+git.1641627031.7bd659d.tar.gz new file mode 100644 index 0000000..accf475 --- /dev/null +++ b/epy-2021.10.23+git.1641627031.7bd659d.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d106ebcddbb0e2d63856b9f4493b9727a163f1ccb115c783b93e978b82621f8d +size 204769 diff --git a/epy.changes b/epy.changes index dd4d897..a588cb9 100644 --- a/epy.changes +++ b/epy.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Sat Jan 08 07:31:46 UTC 2022 - mcepl@cepl.eu + +- Update to version 2021.10.23+git.1641627031.7bd659d: + * .mkpkg -> Makefile + * Patch PKGBUILD + +------------------------------------------------------------------- +Sat Jan 08 07:19:58 UTC 2022 - mcepl@cepl.eu + +- Update to version 2021.10.23+git.1641622438.69c2f80: + * Hotfix: curses has no attrib window in termux + * Added default color config + * Added PKGBUILD for Arch + * Adjust setup.py and pyproject.toml to include epy_extras + * Cleanup on failed ebook initialization + * Initial prepackaging kindleunpack with epy + * Use setuptools as setup backend instead of poetry + * Update version and README.md + * Change history matching key from filepath to title author + * Initial library implementation + * Always calculate reading_progress whenever possible, just not always shown + * Refactor attribute name + * Fixed book metadata + * Add (sup|sub)script lookup table + * Implement HTMLtoLines._group_spans_by_row() + * Hotfix: adjust starting_line for inline style + * Add text mark/span grouper method + * Initial refactor: inline styling + * Add ipdb dev dependency + * Hotfix: Skip adding toc entry for empty label name + * Update development env using poetry + * Fix path resolver for Mobi.get_img_bytstr() + * Add tests + * Add requirements-dev.txt + * Add support for Epub==v1.0 and simplify path resolver + * Remove bad try-except block + * Refactor Epub and Mobi object + * Hotfix: Update docstr + * Fixed plethora type issues + * Added SpeakerBaseModel as TTS engine wrapper + * Use mimic instead of pico2wave. (#44) + * Update README.md: remove AUR installation instruction + * Update .gitignore + * Fixed unavailable curses.A_ITALIC and update version + * Update LICENSE + * Allow setting language for TTS. (#43) + ------------------------------------------------------------------- Mon Dec 20 19:39:29 UTC 2021 - Matej Cepl diff --git a/epy.spec b/epy.spec index 6bd5387..4bf41d6 100644 --- a/epy.spec +++ b/epy.spec @@ -1,7 +1,7 @@ # # spec file for package epy # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,13 @@ Name: epy -Version: 2021.10.23+git.1636702550.2ab1584 +Version: 2021.10.23+git.1641627031.7bd659d Release: 0 Summary: CLI ebook reader License: GPL-3.0-only URL: https://github.com/wustho/epy # Source: https://files.pythonhosted.org/packages/source/e/epy-reader/epy-reader-%%{version}.tar.gz#/epy-%%{version}.tar.gz Source: epy-%{version}.tar.gz -# PATCH-FIX-UPSTREAM mimic.patch gh#wustho/epy#42 mcepl@suse.com -# Use mimic instead of non-free svox. -Patch0: mimic.patch BuildRequires: fdupes BuildRequires: python3-mobi BuildRequires: python3-setuptools @@ -55,6 +52,9 @@ CLI Ebook reader. Fork of epr with these extra features: %prep %autosetup -p1 -n epy-%{version} +# All those shebangs are just harmful +find . -name \*.py -exec sed -i "1{/#!\/usr\/bin\/env python/d}" '{}' \; + %build python3 setup.py build diff --git a/mimic.patch b/mimic.patch deleted file mode 100644 index 8917dcb..0000000 --- a/mimic.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 30596836fcd707098bbae6ebe453e67eb2caef87 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= -Date: Mon, 20 Dec 2021 19:50:30 +0100 -Subject: [PATCH] Use mimic instead of pico2wave. - -Unfortunately, the language setting is gone again. - -Fixes #42 ---- - README.md | 10 ++++------ - epy.py | 22 +++++++++------------- - 2 files changed, 13 insertions(+), 19 deletions(-) - ---- a/README.md -+++ b/README.md -@@ -93,21 +93,19 @@ But you can enable it by setting `MouseS - - To get Text-to-Speech (TTS) support, you need to install these external dependencies: - --- `pico2wave` (from `libttspico-utils` package (Ubuntu) or `svox-pico-bin` package (AUR)) --- `play` (from `sox` package) -+- `mimic` package (AUR)) - - eg. - - ```shell - $ # Ubuntu --$ apt install libttspico-utils sox -+$ apt install mimic - - $ # Arch --$ yay -S svox-pico-bin --$ pacman -S sox -+$ pacman -S mimic - ``` - --And then make sure `pico2wave` and `play` is in `$PATH`. -+And then make sure `mimic` is in `$PATH`. - - ## Double Spread - ---- a/epy.py -+++ b/epy.py -@@ -1871,7 +1871,7 @@ class Reader: - self.jump_list: Mapping[str, ReadingState] = dict() - - # TTS speaker utils -- self._tts_support: bool = any([shutil.which("pico2wave"), shutil.which("play")]) -+ self._tts_support: bool = any([shutil.which("mimic")]) - self.is_speaking: bool = False - - # multi process & progress percentage -@@ -2334,19 +2334,16 @@ class Reader: - self.screen.refresh() - self.screen.timeout(1) - try: -- _, path = tempfile.mkstemp(suffix=".wav") -- subprocess.call( -- ["pico2wave", "-w", path, text], -- stdout=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL, -- ) -- speaker = subprocess.Popen( -- ["play", path, "tempo", str(self.setting.TTSSpeed)], -+ spk = subprocess.Popen( -+ ["mimic"], text=True, -+ stdin=subprocess.PIPE, - stdout=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL, -+ stderr=subprocess.STDOUT, - ) -+ spk.stdin.write(text) -+ spk.stdin.close() - while True: -- if speaker.poll() is not None: -+ if spk.poll() is not None: - k = self.keymap.PageDown[0] - break - tmp = self.screen.getch() -@@ -2373,12 +2370,11 @@ class Reader: - + self.keymap.ScrollDown - + (curses.KEY_RESIZE,) - ): -- speaker.terminate() -+ spk.terminate() - # speaker.kill() - break - finally: - self.screen.timeout(-1) -- os.remove(path) - - if k in self.keymap.Quit: - self.is_speaking = False From cba9d14a50751842f70a316cea2906dd5d01037178ce2b38be89dd22aa447cc5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 23:30:44 +0000 Subject: [PATCH 2/3] - Update to version 2022.1.8+git.1641653565.c1f9b4e: * Update README.md: added AUR installation * Delete .mkpkg script OBS-URL: https://build.opensuse.org/package/show/Education/epy?expand=0&rev=10 --- _service | 16 ++++++++++++++++ _servicedata | 2 +- epy-2021.10.23+git.1641627031.7bd659d.tar.gz | 3 --- epy-2022.1.8+git.1641653565.c1f9b4e.tar.gz | 3 +++ epy.changes | 7 +++++++ epy.spec | 2 +- 6 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 _service delete mode 100644 epy-2021.10.23+git.1641627031.7bd659d.tar.gz create mode 100644 epy-2022.1.8+git.1641653565.c1f9b4e.tar.gz diff --git a/_service b/_service new file mode 100644 index 0000000..540cbb2 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + 2022.1.8+git + https://github.com/wustho/epy.git + git + .git* + enable + mcepl@cepl.eu + + + gz + *.tar + enable + + + diff --git a/_servicedata b/_servicedata index 0d0f995..57badc1 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/wustho/epy.git - 7bd659d5b9d42ed5e7a1b0a8ceb54bf24ec7e117 \ No newline at end of file + c1f9b4e9281e0f5f26b9473ca3f4b3f78412464d \ No newline at end of file diff --git a/epy-2021.10.23+git.1641627031.7bd659d.tar.gz b/epy-2021.10.23+git.1641627031.7bd659d.tar.gz deleted file mode 100644 index accf475..0000000 --- a/epy-2021.10.23+git.1641627031.7bd659d.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d106ebcddbb0e2d63856b9f4493b9727a163f1ccb115c783b93e978b82621f8d -size 204769 diff --git a/epy-2022.1.8+git.1641653565.c1f9b4e.tar.gz b/epy-2022.1.8+git.1641653565.c1f9b4e.tar.gz new file mode 100644 index 0000000..d4a0dad --- /dev/null +++ b/epy-2022.1.8+git.1641653565.c1f9b4e.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f446e0a35f464c82e8d64579880ca539b26584757a82ceb79b12c6a23325e4 +size 204742 diff --git a/epy.changes b/epy.changes index a588cb9..2e1a8fe 100644 --- a/epy.changes +++ b/epy.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jan 08 23:30:07 UTC 2022 - mcepl@cepl.eu + +- Update to version 2022.1.8+git.1641653565.c1f9b4e: + * Update README.md: added AUR installation + * Delete .mkpkg script + ------------------------------------------------------------------- Sat Jan 08 07:31:46 UTC 2022 - mcepl@cepl.eu diff --git a/epy.spec b/epy.spec index 4bf41d6..b478b1c 100644 --- a/epy.spec +++ b/epy.spec @@ -17,7 +17,7 @@ Name: epy -Version: 2021.10.23+git.1641627031.7bd659d +Version: 2022.1.8+git.1641653565.c1f9b4e Release: 0 Summary: CLI ebook reader License: GPL-3.0-only From 828462fdc3ea3fbe26043340fb43fd70309b175bfa14497cdbdd67fe407e26cc Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 23:38:15 +0000 Subject: [PATCH 3/3] Fix changes OBS-URL: https://build.opensuse.org/package/show/Education/epy?expand=0&rev=11 --- epy.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/epy.changes b/epy.changes index 2e1a8fe..f43543a 100644 --- a/epy.changes +++ b/epy.changes @@ -52,6 +52,7 @@ Sat Jan 08 07:19:58 UTC 2022 - mcepl@cepl.eu * Fixed unavailable curses.A_ITALIC and update version * Update LICENSE * Allow setting language for TTS. (#43) +- Remove upstreamed mimic.patch. ------------------------------------------------------------------- Mon Dec 20 19:39:29 UTC 2021 - Matej Cepl