Metadata-Version: 2.4
Name: local-diff-san
Version: 0.1.7
Summary: Single-pane word-flow and character-level local file and Git HEAD diff viewer for Sanskrit & Indic scholarship
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,diff,git,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: pull_requests_san>=0.1.8
Requires-Dist: pydantic>=2.0
Requires-Dist: uvicorn>=0.23
Dynamic: license-file

# local-diff-san

Single-pane word-flow, intra-word character/Vedic-grapheme, and 2-pane local diff viewer built on [`pull_requests_san`](../pull_requests/README.md) for Sanskrit and Indic scholarship.

## Install

```bash
pip install local-diff-san
```

## Usage

```bash
# Compare a local file against Git HEAD (or another revision via --rev)
local-diff-san path/to/file.md
local-diff-san path/to/file.md --rev HEAD~1

# Compare two given local files side-by-side or in single-pane word flow
local-diff-san old_file.md new_file.md

# Browse all changed files in the current git repository (or a directory) vs HEAD
local-diff-san
local-diff-san path/to/dir

- Live web app (pure-JS file/text diff): [sanskrit-coders.github.io/diff_san/local_diff/](https://sanskrit-coders.github.io/diff_san/local_diff/)

# Export a standalone static HTML website (pure JS client-side file/text diffing)
local-diff-san --export-static docs/local_diff/index.html

# Or invoke as a Python module
python -m local_diff_san old_file.md new_file.md
```

## Key Features

- **Single-pane word-flow diff** (default) with intra-word character highlights and **2-pane LHS/RHS mode** (`Alt+S`), powered by `pull_requests_san.diff` on the CLI or pure-JS `DiffSanEngine` in static browser mode.
- **Vedic grapheme (`\X`) & raw codepoint modes** keeping Vedic svara marks (`U+1CD3` `᳓`, etc.) attached to their akṣara.
- **Expandable collapsed context lines** (click any collapsed-lines bar to expand), **Sandhi diff** highlighting (active by default for interword sandhi like `अस्ति इति` ↔ `अस्तीति` or `ऽस्मिन्न् इति` ↔ `ऽस्मिन् इति`, with `◀`/`▶` & `Alt+Shift+↑`/`↓` jump between sandhi diffs), unified **OLD/NEW dashed-pair boxing**, keyboard & mouse navigation (`Shift+Click` or `↑`/`↓` select line, right-click **Copy diff for bug report**, `Ctrl+F` codepoint-exact find supporting combining marks like `ँ`, `PgUp`/`PgDn` scroll page & select first visible line, `Alt+↑`/`Alt+↓` jump prev/next diff line), Unicode normalization (`NFC`/`NFD`/`NFKC`/`NFKD`), `Ignore punct`, customizable **Settings color pickers**, **GoldenDict** lookup, and click-to-jump **IntelliJ IDEA** line opening.

## IDE Integrations

Launch `local-diff-san` straight from your editor's file tree, editor tab, or VCS view:

- **JetBrains IDEs:** [`sanskrit-coders/jetbrains_san`](https://github.com/sanskrit-coders/jetbrains_san) ([JetBrains Marketplace](https://plugins.jetbrains.com/plugin/36520-github-san-tools))
- **VS Code / Open VSX:** [`sanskrit-coders/vscode_san`](https://github.com/sanskrit-coders/vscode_san) ([VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sanskrit-coders.github-san), [Open VSX](https://open-vsx.org/extension/sanskrit-coders/github-san))
