Package: epr-reader
$ eprTerminal/CLI Epub reader written in Python 3.6 with features:Remembers last read file (just runeprwithout any argument)Remembers last reading state for each file (per file saved state written to$HOME/.config/epr/configor$HOME/.eprrespectively depending on availability)Adjustable text area widthAdaptive to terminal resizeSupports EPUB3 (no audio support)Secondary vim-like bindingsSupports opening imagesDark/Light colorscheme (depends on terminal color capability)LimitationsMinimum width: 22 colsSupports regex search onlySupports only horizontal left-to-right textCurrently, only supports language with latin alphabet (seeissue30)Doesn't support hyperlinksSuperscriptandsubscriptdisplayed as^{Superscript}and_{subscript}.Some known issues mentioned belowDependenciesWindows:windows-cursesInstallationVia PyPI$pip3installepr-readerVia Pip+Git$pip3installgit+https://github.com/wustho/epr.gitViaHomebrewfor macOS or Linux$brewinstalleprVia ChocolateyMaintained bycybercatgurrl$chocoinstalleprVia AURMaintained byjneidel$yay-Sepr-gitManuallyClone this repo, tweakepr.pyas much as you see fit, rename it toepr, make it executable and put it somewhere inPATH.Checkoutepy!It's just a fork of thiseprwith little more features:Formats supported: epub, epub3, fb2, mobi, azw3, url.Reading progress percentageBookmarksExternal dictionary integrationTable of contents scheme like regular ebook readerInline formats:boldanditalic(depend on terminal and font capability. Italic only supported in python>=3.7)Text-to-Speech (with additional setup)Page flip animationSeamless between chapterInstall it with:$pip3installgit+https://github.com/wustho/epyQuickly Read from HistoryRather than invokingepr /path/to/fileeach time you are going to read, you might find it easier to do justepr STRINGS.Example:$eprdumascountmontIfSTRINGSis not any file,eprwill choose from reading history, best matchedpath/to/filewith thoseSTRINGS.So, the moreSTRINGSgiven the more accurate it will find.Runepr -rto show list of all reading history.Opening an ImageJust hitowhen[IMG:n](nis any number) comes up on a page. If there's only one of those, it will automatically open the image using viewer, but if there are more than one, cursor will appear to help you choose which image then pressRETto open it andqto cancel.ColorschemeThis is just a simple colorscheme involving foreground dan background color only, no syntax highlighting.
You can cycle color between default terminal color, dark or light respectively by pressingc.
You can also switch color to default, dark or light by pressing0c,1cor2crespectively.Customizing dark/light colorscheme needs to be done inside the source code by editing these lines:# colorscheme# DARK/LIGHT = (fg, bg)# -1 is default terminal fg/bgDARK=(252,235)LIGHT=(239,223)To see available values assigned to colors, you can run this one-liner on bash:$i=0;forjin{1..16};doforkin{1..16};doprintf"\e[1;48;05;${i}m %03d \e[0m"$i;i=$((i+1));done;echo;doneKnown IssuesSearch function can't find occurrences that span across multiple linesOnly capable of finding pattern that span inside a single line, not sentence.
So works more effectively for finding word or letter rather than long phrase or sentence.As workarounds, You can increase text area width to increase its reach or dump
the content of epub using-doption, which will dump each paragraph into a single line separated by empty line
(or lines depending on the epub), to be later piped intogrep,rgetc. Pretty useful to find book quotes.Example:# to get 1 paragraph before and after a paragraph containing "Overdue"$epr-dthe_girl_next_door.epub|grepOverdue-C2Some TOC issues (Checkoutepyif you're bothered with these issues):"-" chapters in TOCThis happens because not every chapter file (inside some epubs) is given navigation points.
Some epubs even won't let you navigate between chapter, thus you'll find all chapters named as
"-" usingeprfor these kind of epubs.Skipped chapters in TOCExample:Table of Contents
-----------------

    1. Title Page
    2. Chapter I
    3. Chapter VThis happens because Chapter II to Chapter IV is probably in the same file with Chapter I,
but in different sections, e. g.ch000.html#section1andch000.html#section2.But don't worry, you should not miss any part to read. This just won't let you navigate
to some points using TOC.Sometimes page flipping itself to new chapter when scrollingThis might be disorienting. To avoid this issue, you can useepyinstead
which fixed this issue by setting its configSeamlessBetweenChapters.Inspirationshttps://github.com/aerkalov/ebooklibhttps://github.com/rupa/epub