local-diff-san 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- local_diff_san-0.1.0/LICENSE +21 -0
- local_diff_san-0.1.0/MANIFEST.in +3 -0
- local_diff_san-0.1.0/PKG-INFO +60 -0
- local_diff_san-0.1.0/README.md +33 -0
- local_diff_san-0.1.0/local_diff_san/__init__.py +27 -0
- local_diff_san-0.1.0/local_diff_san/__main__.py +7 -0
- local_diff_san-0.1.0/local_diff_san/core.py +587 -0
- local_diff_san-0.1.0/local_diff_san/server.py +209 -0
- local_diff_san-0.1.0/local_diff_san/templates/local_diff.html +465 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/PKG-INFO +60 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/SOURCES.txt +15 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/dependency_links.txt +1 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/entry_points.txt +3 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/requires.txt +4 -0
- local_diff_san-0.1.0/local_diff_san.egg-info/top_level.txt +1 -0
- local_diff_san-0.1.0/pyproject.toml +44 -0
- local_diff_san-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sanskrit Coders
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: local-diff-san
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Single-pane word-flow and character-level local file and Git HEAD diff viewer for Sanskrit & Indic scholarship
|
|
5
|
+
Author-email: Sanskrit Coders <sanskrit-programmers@googlegroups.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sanskrit-coders/diff_san
|
|
8
|
+
Project-URL: Repository, https://github.com/sanskrit-coders/diff_san
|
|
9
|
+
Keywords: sanskrit,diff,git,devanagari,vedic,proofreading
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: fastapi>=0.100
|
|
23
|
+
Requires-Dist: pull_requests_san>=0.1.1
|
|
24
|
+
Requires-Dist: pydantic>=2.0
|
|
25
|
+
Requires-Dist: uvicorn>=0.23
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# local-diff-san
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install local-diff-san
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Compare a local file against Git HEAD (or another revision via --rev)
|
|
42
|
+
local-diff-san path/to/file.md
|
|
43
|
+
local-diff-san path/to/file.md --rev HEAD~1
|
|
44
|
+
|
|
45
|
+
# Compare two given local files side-by-side or in single-pane word flow
|
|
46
|
+
local-diff-san old_file.md new_file.md
|
|
47
|
+
|
|
48
|
+
# Browse all changed files in the current git repository (or a directory) vs HEAD
|
|
49
|
+
local-diff-san
|
|
50
|
+
local-diff-san path/to/dir
|
|
51
|
+
|
|
52
|
+
# Or invoke as a Python module
|
|
53
|
+
python -m local_diff_san old_file.md new_file.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Key Features
|
|
57
|
+
|
|
58
|
+
- **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`.
|
|
59
|
+
- **Vedic grapheme (`\X`) & raw codepoint modes** keeping Vedic svara marks (`U+1CD3` `᳓`, etc.) attached to their akṣara.
|
|
60
|
+
- **Unicode normalization (`NFC`/`NFD`/`NFKC`/`NFKD`) & `Ignore punct`**, customizable **Settings color pickers** (persisted across `pull_requests_san` and `local-diff-san`), **GoldenDict** lookup, and click-to-jump **IntelliJ IDEA** line opening.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# local-diff-san
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install local-diff-san
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Compare a local file against Git HEAD (or another revision via --rev)
|
|
15
|
+
local-diff-san path/to/file.md
|
|
16
|
+
local-diff-san path/to/file.md --rev HEAD~1
|
|
17
|
+
|
|
18
|
+
# Compare two given local files side-by-side or in single-pane word flow
|
|
19
|
+
local-diff-san old_file.md new_file.md
|
|
20
|
+
|
|
21
|
+
# Browse all changed files in the current git repository (or a directory) vs HEAD
|
|
22
|
+
local-diff-san
|
|
23
|
+
local-diff-san path/to/dir
|
|
24
|
+
|
|
25
|
+
# Or invoke as a Python module
|
|
26
|
+
python -m local_diff_san old_file.md new_file.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Key Features
|
|
30
|
+
|
|
31
|
+
- **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`.
|
|
32
|
+
- **Vedic grapheme (`\X`) & raw codepoint modes** keeping Vedic svara marks (`U+1CD3` `᳓`, etc.) attached to their akṣara.
|
|
33
|
+
- **Unicode normalization (`NFC`/`NFD`/`NFKC`/`NFKD`) & `Ignore punct`**, customizable **Settings color pickers** (persisted across `pull_requests_san` and `local-diff-san`), **GoldenDict** lookup, and click-to-jump **IntelliJ IDEA** line opening.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Sanskrit/Indic local file and Git HEAD single-pane & character-level diff viewer."""
|
|
2
|
+
|
|
3
|
+
from local_diff_san.core import (
|
|
4
|
+
DEFAULT_REV,
|
|
5
|
+
LocalDiffItem,
|
|
6
|
+
LocalDiffSpec,
|
|
7
|
+
build_diff_workspace,
|
|
8
|
+
compare_file_with_head,
|
|
9
|
+
compare_two_files,
|
|
10
|
+
discover_git_dir_entries,
|
|
11
|
+
find_git_root,
|
|
12
|
+
read_git_blob,
|
|
13
|
+
resolve_spec_from_paths,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"DEFAULT_REV",
|
|
18
|
+
"LocalDiffItem",
|
|
19
|
+
"LocalDiffSpec",
|
|
20
|
+
"build_diff_workspace",
|
|
21
|
+
"compare_file_with_head",
|
|
22
|
+
"compare_two_files",
|
|
23
|
+
"discover_git_dir_entries",
|
|
24
|
+
"find_git_root",
|
|
25
|
+
"read_git_blob",
|
|
26
|
+
"resolve_spec_from_paths",
|
|
27
|
+
]
|