README.md

 1# view
 2
 3The `view` package handles rendering email content for terminal display. It converts HTML email bodies into styled terminal text with support for inline images, hyperlinks, and quoted reply formatting.
 4
 5## Architecture
 6
 7This package bridges raw email content (HTML/Markdown) and terminal output. It:
 8
 9- Parses HTML email bodies using goquery and converts them to styled terminal text
10- Renders hyperlinks using OSC 8 escape sequences (with fallback for unsupported terminals)
11- Supports inline image rendering via multiple terminal graphics protocols:
12  - **Kitty Graphics Protocol** (Kitty, Ghostty, WezTerm, Wayst, Konsole)
13  - **iTerm2 Image Protocol** (iTerm2, Warp)
14- Detects quoted reply sections (`>` prefixed lines and `On DATE, EMAIL wrote:` patterns) and renders them in styled quote boxes
15- Manages image lifecycle: fetching remote images, resolving CID references, caching, uploading to terminal memory (Kitty IDs), and calculating terminal row placement
16- Converts Markdown to HTML via Goldmark before processing