CLI Book Reader

Phase 1 - Text formatting and pagination

Create a Python script that reads a text file and formats it into pages with a fixed number of lines and characters per line, avoiding splitting words across lines.

  • Read a text file
  • Format text into lines and pages with character and line limits
  • Display a single page at a time

Functional result: Script correctly formats the text into readable pages without splitting words.

Phase 2 - Page navigation

Extend the script to allow navigation between pages using keyboard input.

  • Move forward and backward through pages using left/right keys
  • Display updated page content on navigation
  • Handle edge cases at first and last pages

Functional result: User can navigate the entire book page by page, with proper rendering of all lines and words.