Metadata-Version: 2.4
Name: pull_requests_san
Version: 0.1.13
Summary: Single-pane word-flow and character-level GitHub PR review tool for Sanskrit & Indic repositories
Author-email: Sanskrit Coders <sanskrit-programmers@googlegroups.com>
License: MIT
Project-URL: Homepage, https://github.com/sanskrit-coders/diff_san
Project-URL: Repository, https://github.com/sanskrit-coders/diff_san
Keywords: sanskrit,github,pull-request,diff,devanagari,vedic,proofreading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100
Requires-Dist: regex>=2023.0.0
Requires-Dist: requests>=2.28
Requires-Dist: uvicorn>=0.23
Dynamic: license-file

# pull_requests_san

Single-pane word-flow and character/grapheme-level GitHub Pull Request reviewer tailored for Sanskrit and Indic repositories (`vishvAsa` by default, or any `--owner` / `--repo`).

## Install

```bash
pip install pull_requests_san
```

## Usage

```bash
- Live static web app (load any GitHub PR in browser): [sanskrit-coders.github.io/diff_san/pull_requests/](https://sanskrit-coders.github.io/diff_san/pull_requests/)

# Export a standalone static HTML PR reviewer page
pull_requests_san --export-static docs/pull_requests/index.html

# Review all open PRs in vishvAsa repos (or specify any GitHub user/org)
pull_requests_san --owner vishvAsa --state open

# Review a specific repo or use module invocation
python -m pull_requests_san --owner vishvAsa --repo mahAbhAratam
```

GitHub authentication is auto-resolved in order from `--token`, `GITHUB_TOKEN`/`GH_TOKEN`, `~/.config/gh/hosts.yml`, `gh auth token`, or optional `tokens.toml` (`curation_utils.creds` / TOML fallback).

## Key Features

- **Single-pane word-flow diff** (default) matching changed space-separated strings inline without requiring strict line-by-line alignment (`Alt+S` toggles 2-pane LHS/RHS) and highlighting intra-word character differences cleanly.
- **Vedic grapheme & codepoint modes** keeping trailing Vedic svaras (including `U+1CD3` `᳓`) attached to their akṣara (`Alt+W` toggles between `Word` and `Char (Grapheme \X)`).
- **Unicode normalization (`NFC`/`NFD`/`NFKC`) & `Ignore punct`** (`।`, `॥`, quotes, commas) adapted from `bhashika-org-in/wordiff`.
- **Full GitHub review & PR management**: inline line/range comments (`Ctrl+Click` or `Shift+Click`/`↑`/`↓` + `Ctrl+Enter`), `Tab`/`Shift+Tab` stepping across individual diffs (moving selected line across lines/files), `Ctrl+Space` **"Checked until here"** green checkpoint persisted per PR, multiline `Shift+Enter` replies, right-click **Copy link to line in PR** / **Copy diff_san line link** / **Copy diff for bug report**, `🔗` **Copy PR URL** icon beside `🌐`, deep links (`?pr=...&file=...&side=...&line=...`), `Ctrl+F` codepoint-exact search (finding combining marks like `ँ`), Sandhi diff highlighting (default ON, jump with `◀`/`▶` or `Alt+Shift+↑`/`↓`), draft review batching, approve / request changes, resolve threads, mergeability & 3-way conflict inspection, open PR in main browser (`Alt+B`), merge PR (`Alt+Shift+M`), close/reopen PR (`Alt+Shift+C`).

## Screenshots

### Single-Pane Word-Flow Diff (Default)
Matches changed space-separated strings inline across reflowed paragraphs and line breaks cleanly, with Vedic/Devanagari font sizing (`Adishila SanVedic`, 26px) and inline Sanskrit review threads:

![Single-pane word-flow diff](https://raw.githubusercontent.com/sanskrit-coders/diff_san/master/pull_requests/docs/screenshots/single_pane_word.png)

### PR Controls, Mergeability & Review Submission
Browse all open PRs across an organization or repo, inspect mergeability status, open PRs in your main browser, approve/request changes, close, or merge:

![PR review overview](https://raw.githubusercontent.com/sanskrit-coders/diff_san/master/pull_requests/docs/screenshots/pr_review_overview.png)

### 2-Pane Vedic Grapheme Diff & 3-Way Conflict Inspection
Toggle `Alt+S` for 2-pane LHS/RHS mode and `Char (Grapheme \X)` to keep Vedic accent marks (`U+1CD3` `᳓`, etc.) attached to their akṣara, plus inspect 3-way overlapping merge conflicts before resolving or rebasing:

![2-pane Vedic grapheme and 3-way conflict diff](https://raw.githubusercontent.com/sanskrit-coders/diff_san/master/pull_requests/docs/screenshots/two_pane_grapheme_conflict.png)
