All Projects → wustho → Epr

wustho / Epr

Licence: mit
CLI Epub Reader

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Epr

Fanficfare
FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Stars: ✭ 359 (-45.36%)
Mutual labels:  cli, ebook, epub
Rate.sx
💰 curl cryptocurrencies exchange rates
Stars: ✭ 563 (-14.31%)
Mutual labels:  cli, terminal
Discline
🐍 A terminal Discord client that you can actually use.
Stars: ✭ 553 (-15.83%)
Mutual labels:  cli, terminal
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-12.18%)
Mutual labels:  cli, terminal
World Cup 2018 Cli Dashboard
⚽🏆A World Cup 2018 CLI dashboard – Watch matches in your terminal
Stars: ✭ 529 (-19.48%)
Mutual labels:  cli, terminal
Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (-19.18%)
Mutual labels:  cli, terminal
Wunderbar
Simple horizontal bar chart printer for your terminal
Stars: ✭ 572 (-12.94%)
Mutual labels:  cli, terminal
Bubbles
TUI components for Bubble Tea 🍡
Stars: ✭ 467 (-28.92%)
Mutual labels:  cli, terminal
Rdrview
Firefox Reader View as a command line tool
Stars: ✭ 622 (-5.33%)
Mutual labels:  cli, terminal
Progressbar
Terminal-based progress bar for Java / JVM
Stars: ✭ 625 (-4.87%)
Mutual labels:  cli, terminal
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (-4.87%)
Mutual labels:  cli, terminal
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+643.68%)
Mutual labels:  cli, terminal
Whipper
Python CD-DA ripper preferring accuracy over speed
Stars: ✭ 517 (-21.31%)
Mutual labels:  cli, terminal
Typer
Typer, build great CLIs. Easy to code. Based on Python type hints.
Stars: ✭ 6,793 (+933.94%)
Mutual labels:  cli, terminal
Calibre Web
📚 Web app for browsing, reading and downloading eBooks stored in a Calibre database
Stars: ✭ 5,616 (+754.79%)
Mutual labels:  ebook, epub
Koodo Reader
A modern ebook manager and reader with sync and backup capacities for Windows, macOS, Linux and Web
Stars: ✭ 2,938 (+347.18%)
Mutual labels:  ebook, epub
Tml
🌈💻🎨 A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
Stars: ✭ 634 (-3.5%)
Mutual labels:  cli, terminal
Pulsemixer
CLI and curses mixer for PulseAudio
Stars: ✭ 441 (-32.88%)
Mutual labels:  cli, terminal
Hn Cli
📰 CLI to browse Hacker News
Stars: ✭ 448 (-31.81%)
Mutual labels:  cli, terminal
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (-13.39%)
Mutual labels:  cli, terminal

$ epr

Screenshot

Terminal/CLI Epub reader written in Python 3.6 with features:

  • Remembers last read file (just run epr without any argument)
  • Remembers last reading state for each file (per file saved state written to $HOME/.config/epr/config or $HOME/.epr respectively depending on availability)
  • Adjustable text area width
  • Adaptive to terminal resize
  • Supports EPUB3 (no audio support)
  • Secondary vim-like bindings
  • Supports opening images
  • Dark/Light colorscheme (depends on terminal color capability)

Limitations

  • Minimum width: 22 cols
  • Supports regex search only
  • Supports only horizontal left-to-right text
  • Currently, only supports language with latin alphabet (see issue30)
  • Doesn't support hyperlinks
  • Superscript and subscript displayed as ^{Superscript} and _{subscript}.
  • Some known issues mentioned below

Dependencies

  • Windows: windows-curses

Installation

Via PyPI

$ pip3 install epr-reader

Via Pip+Git

$ pip3 install git+https://github.com/wustho/epr.git

Via Chocolatey

maintained by cybercatgurrl

$ choco install epr

Via AUR

maintained by jneidel

$ yay -S epr-git

Manually

Clone this repo, tweak epr.py as much as you see fit, rename it to epr, make it executable and put it somewhere in PATH.

Checkout epy!

It's just a fork of this epr with little more features:

  • Formats supported: epub, epub3, fb2, mobi, azw3.
  • Reading progress percentage
  • Bookmarks
  • External dictionary integration
  • Table of contents scheme like regular ebook reader
  • Inline formats: bold and italic (depend on terminal and font capability. Italic only supported in python>=3.7)
  • Text-to-Speech (with additional setup)

Install it with:

$ pip3 install git+https://github.com/wustho/epy

Quickly Read from History

Rather than invoking epr /path/to/file each time you are going to read, you might find it easier to do just epr STRINGS.

Example:

$ epr dumas count mont

If STRINGS is not any file, epr will choose from reading history, best matched path/to/file with those STRINGS. So, the more STRINGS given the more accurate it will find.

Run epr -r to show list of all reading history.

Opening an Image

Just hit o when [IMG:n] (n is 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 press RET to open it and q to cancel.

Colorscheme

This 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 pressing c. You can also switch color to default, dark or light by pressing 0c, 1c or 2c respectively.

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/bg
DARK = (252, 235)
LIGHT = (239, 223)

To see available values assigned to colors, you can run this one-liner on bash:

$ i=0; for j in {1..16}; do for k in {1..16}; do printf "\e[1;48;05;${i}m %03d \e[0m" $i; i=$((i+1)); done; echo; done

Known Issues

  1. Search function can't find occurences that span across multiple lines

    Only 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 -d option, which will dump each paragraph into a single line separated by empty line (or lines depending on the epub), to be later piped into grep, rg etc. Pretty useful to find book quotes.

    Example:

    # to get 1 paragraph before and after a paragraph containing "Overdue"
    $ epr -d the_girl_next_door.epub | grep Overdue -C 2
    
  2. Some TOC issues (Checkout epy if you're bothered with these issues):

    • "-" chapters in TOC

      This 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 "-" using epr for these kind of epubs.

    • Skipped chapters in TOC

      Example:

      Table of Contents
      -----------------
      
          1. Title Page
          2. Chapter I
          3. Chapter V
      

      This happens because Chapter II to Chapter IV is probably in the same file with Chapter I, but in different sections, e. g. ch000.html#section1 and ch000.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.

Inspirations

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].