A simple command-line application for reading plain text files. The reader splits files into pages, remembers your last read position for each book and supports configurable page sizes.
- Remembers the last page read for multiple files
- Configurable number of lines per page
- Jump to a specific page or reset your progress
- Loads optional defaults from a
.envfile
pip install -r requirements.txtpython main.py --file path/to/book.txt--goto <page>– start from a specific page (0 indexed)--reset– reset stored progress for the file--page-size <lines>– override number of lines per page
The application stores progress in last_read.json. Each entry maps a file
path to the next page that should be displayed.
python main.py --file book.txt --page-size 20After each page is displayed, the reader saves the next page number to
last_read.json. When you restart the program with the same file it resumes
from where you left off.
- Only plain text files are supported.
- Page numbers are zero based when using
--goto. last_read.jsonmay grow if many unique file paths are used.
Copy .env.example to .env and adjust values:
PAGE_SIZE=25
STATE_FILE=last_read.jsonRun the unit tests with:
pytest