From aac7813abc0ceaedbbca37a0b898ae161b6e8c0f Mon Sep 17 00:00:00 2001 From: benadha Date: Tue, 2 Feb 2021 19:15:09 +0700 Subject: TTS in double spread mode --- README.md | 7 ++++++- epy.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2490afe..fb660bd 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This is just a fork of my own [epr](https://github.com/wustho/epr) with these ex - External dictionary integration (`sdcv` or `dict`) - Inline formats: **bold** and _italic_ (depend on terminal and font capability. Italic only supported in python>=3.7) - Text-to-Speech (with additional setup, read [below](#text-to-speech)) +- [Double Spread](#double-spread) # Installation @@ -78,4 +79,8 @@ $ yay -S svox-pico-bin $ pacman -S sox ``` -And then make sure `pico2wave` and `play` is in `$PATH`. \ No newline at end of file +And then make sure `pico2wave` and `play` is in `$PATH`. + +# Double Spread + +Double spread is intended to mimic the behaviour of real book, so line scrolling navigation will act as scrolling page. \ No newline at end of file diff --git a/epy.py b/epy.py index 9190f26..d76355a 100755 --- a/epy.py +++ b/epy.py @@ -14,7 +14,7 @@ Options: """ -__version__ = "2021.2.2" +__version__ = "2021.2.3" __license__ = "GPL-3.0" __author__ = "Benawi Adha" __email__ = "benawiadha@gmail.com" @@ -1694,7 +1694,7 @@ def reader(ebook, index, width, y, pctg, sect): elif k in K["TTSToggle"] and TTSSUPPORT: # tospeak = "\n".join(src_lines[y:y+rows-1]) tospeak = "" - for i in src_lines[y:y+rows]: + for i in src_lines[y:y+(rows*SPREAD)]: if re.match(r"^\s*$", i) is not None: tospeak += "\n. \n" else: -- cgit