Bump version to 0.2.1
This commit is contained in:
10
AGENTS.md
10
AGENTS.md
@@ -58,7 +58,7 @@ from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Annotated, Optional
|
||||
from typing import Annotated
|
||||
|
||||
import typer
|
||||
from rich.console import Console
|
||||
@@ -152,6 +152,12 @@ When adding new file types:
|
||||
- `json` → use `rich.json.JSON` with fallback to `Syntax`
|
||||
- All other types → use `rich.syntax.Syntax`
|
||||
|
||||
### Pager Behavior
|
||||
The pager prefers `less -R --mouse` when available (version 543+) for mouse scrolling. Falls back to Rich's `SystemPager` otherwise.
|
||||
|
||||
### Version Sync
|
||||
Version metadata must stay in sync between `pyproject.toml` and `src/rp/__init__.py`.
|
||||
|
||||
## Project Structure
|
||||
```
|
||||
rich-viewer/
|
||||
@@ -174,7 +180,7 @@ rich-viewer/
|
||||
- `rich>=13.0` — Terminal rendering (Markdown, JSON, Syntax)
|
||||
- `typer>=0.12` — CLI framework
|
||||
|
||||
Both are runtime dependencies. No dev dependencies are currently specified.
|
||||
Runtime dependencies. Dev dependencies: `ruff>=0.9`, `mypy>=1.14`.
|
||||
|
||||
## Git Conventions
|
||||
- Write clear, imperative commit messages
|
||||
|
||||
88
README.md
88
README.md
@@ -1,3 +1,91 @@
|
||||
# rp
|
||||
|
||||
Rich print files — markdown, JSON, code, and more — beautifully in your terminal.
|
||||
|
||||
## Features
|
||||
|
||||
- **Syntax highlighting** for 500+ languages via Pygments
|
||||
- **Markdown rendering** with headings, code blocks, tables, and links
|
||||
- **JSON formatting** with syntax highlighting
|
||||
- **Pager integration** with mouse scrolling support
|
||||
- **Stdin support** for piping content
|
||||
|
||||
## Installation
|
||||
|
||||
### Install globally with uv
|
||||
|
||||
```bash
|
||||
uv tool install .
|
||||
```
|
||||
|
||||
### Run directly with uv
|
||||
|
||||
```bash
|
||||
uv run rp <file>
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic file input
|
||||
|
||||
```bash
|
||||
rp README.md
|
||||
rp config.json
|
||||
rp script.py
|
||||
```
|
||||
|
||||
### Read from stdin
|
||||
|
||||
```bash
|
||||
cat data.json | rp
|
||||
echo '{"status": "ok"}' | rp
|
||||
curl -s https://api.example.com | rp
|
||||
```
|
||||
|
||||
### Force file type
|
||||
|
||||
```bash
|
||||
rp --type python script.txt
|
||||
rp -t json data.txt
|
||||
```
|
||||
|
||||
### Pager control
|
||||
|
||||
```bash
|
||||
rp --pager README.md # Force pager
|
||||
rp --no-pager file.py # Disable pager
|
||||
```
|
||||
|
||||
The pager prefers `less -R --mouse` for mouse scrolling when available, otherwise falls back to the system pager.
|
||||
|
||||
### Show version
|
||||
|
||||
```bash
|
||||
rp --version
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
```
|
||||
|
||||
### Linting & Type Checking
|
||||
|
||||
```bash
|
||||
uv run ruff check src/
|
||||
uv run ruff format src/
|
||||
uv run mypy src/
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
uv build
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "rp"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
description = "Rich print files — markdown, JSON, code, and more — beautifully in your terminal"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
__version__ = "0.2.0"
|
||||
__version__ = "0.2.1"
|
||||
__author__ = "Yunxiao Xu"
|
||||
__license__ = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user