Commit Graph

8 Commits

Author SHA1 Message Date
93c777cf6a Add opt-in debug logging across the CLI pipeline
Thread RP_DEBUG-driven logging through input, detection, rendering, and pager decisions so CLI behavior is inspectable without polluting stdout. Add focused coverage for debug wiring, env parsing, and stderr-only output.
2026-04-03 19:09:24 -07:00
0e7f30d6c3 Add padding around rendered output 2026-04-01 23:59:34 -07:00
32a8a1d4ad Improve documentation and modernize type hints 2026-04-01 21:06:34 -07:00
5935140620 Fix mypy type errors in render.py by annotating renderable variable 2026-04-01 18:57:49 -07:00
e74f9a3c74 Add mouse-scrollable pager with fallback to system pager 2026-04-01 18:23:06 -07:00
dd45fb05f7 Handle unknown lexer, remove dead _THEMES list, tighten JSON detection - Catch unknown Pygments lexer names and fall back to plain text - Remove unused _THEMES list from cli.py - Only auto-detect JSON when content starts with { or [ to avoid false positives on trivial values like strings or numbers 2026-04-01 16:10:21 -07:00
5db15a8a17 Fix review issues: error handling, stdin TTY hint, narrow exceptions - Handle UnicodeDecodeError and PermissionError for file reading - Show hint when stdin is a TTY and no file given - Narrow JSON fallback exception from Exception to (SyntaxError, ValueError) - Rename 'type' parameter to 'file_type' to avoid shadowing builtin - Remove dead '.R' entry from EXTENSION_MAP 2026-04-01 16:02:56 -07:00
1abfcebc24 Implement rp CLI: rich-print markdown, JSON, code, and more
- Add typer CLI with auto file-type detection by extension
- Support markdown (rich.Markdown), JSON (rich.JSON), and 30+ code
  languages via Pygments syntax highlighting
- Features: line numbers toggle, pager support, stdin input,
  configurable color themes
- Project metadata: MIT license, author, classifiers, entry point
2026-04-01 15:56:57 -07:00