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
This commit is contained in:
2026-04-01 15:56:57 -07:00
parent a1b5e72032
commit 1abfcebc24
7 changed files with 404 additions and 4 deletions

View File

@@ -1,13 +1,36 @@
[project]
name = "rp"
version = "0.1.0"
description = "Add your description here"
description = "Rich print files — markdown, JSON, code, and more — beautifully in your terminal"
readme = "README.md"
license = "MIT"
authors = [
{ name = "Yunxiao Xu", email = "xuyunxiao2001@gmail.com" }
]
keywords = ["cli", "rich", "syntax-highlighting", "markdown", "terminal"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Utilities",
"Typing :: Typed",
]
requires-python = ">=3.12"
dependencies = []
dependencies = [
"rich>=13.0",
"typer>=0.12",
]
[project.scripts]
rp = "rp.cli:app"
[project.urls]
Homepage = "https://github.com/yunxiaoxu/rich-viewer"
Repository = "https://github.com/yunxiaoxu/rich-viewer"
[build-system]
requires = ["uv_build>=0.11.2,<0.12.0"]