Metadata-Version: 2.4
Name: edit-core-comm
Version: 0.1.1
Summary: Focused editor for विश्वास-प्रस्तुतिः and selected commentary blocks across vishvAsa Markdown corpora with prefill sync and local-diff-san links
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,vedic,commentary,markdown,proofreading,vishvasa
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: doc_curation>=0.1.22
Requires-Dist: fastapi>=0.100
Requires-Dist: local-diff-san>=0.1.39
Requires-Dist: pull_requests_san>=0.1.41
Requires-Dist: pydantic>=2.0
Requires-Dist: uvicorn>=0.23
Dynamic: license-file

# edit-core-comm

Focused web editor for editing **`विश्वास-प्रस्तुतिः`** side-by-side with **selected commentary blocks** across `vishvAsa` Markdown corpora — whether stored inline inside `sarva-prastutiH` files (with `<details><summary>सर्वाष् टीकाः</summary>`) or included via `<div class="js_include">` from `static/` (`vishvAsa-prastutiH/`, `mUlam/`, `sarvASh_TIkAH/`, or standalone author directories).

## Installation

```bash
pip install -e ./edit_core_comm
```

## Usage

```bash
# Point to a folder or a single Markdown file:
edit-core-comm /path/to/vedAH_yajuH/content/.../07_pAramAtmikopaniShat
edit-core-comm /path/to/mahAbhAratam/content/.../01_arjuna-viShAda-yogaH --comm "शङ्करः › आनन्दगिरिः"
# Or via Python module:
python -m edit_core_comm --dir /path/to/folder
```

Useful flags:
- `target` / `--dir`: File or directory to load (`--dir` overrides positional path).
- `-c`, `--comm`: Commentary filter key(s) to preselect on load (repeatable).
- `--port PORT`: Port to bind on `127.0.0.1` (default `8774`, advancing if busy).
- `--no-browser`: Start without opening a browser window.
- `--restart`: Stop any existing `edit-core-comm` server and start fresh.

## Features

- **Distraction-free editing**: Shows `विश्वास-प्रस्तुतिः` cleanly stacked above (`Stacked` default, toggleable to `Side-by-side` via `Alt+W`) the commentary(ies) you pick in a drag-reorderable picker, hiding extraneous edition variants and `पद-पाठः` lists until selected, with a collapsible subtree file tree (`Ctrl+PgUp`/`PgDn`).
- **Saves to the authoritative source block**: Edits inside prefilled `<div class="js_include">` host files are routed to the underlying `static/` target file (and transitively synced back into prefilled host files via `doc_curation`'s `surgical_prefill_transitive`).
- **Tag-balance safety & conflict detection**: Refuses saves that unbalance `<details>`/`<div>` tags or overwrite external disk changes without force.
- **Direct `local-diff-san` container launch (`Alt+D`)**: Launch `local-diff-san` in its dedicated `--app` browser window on any individual affected file or all session/dirty files together straight from the editor.
- **Optional local `hyphene` (`Alt+H`) & Sanskrit ergonomics**: One-click block hyphenation when `doc_curation.sanskrit.hyphenator` neural weights are installed locally, `Tiro Devanagari Sanskrit` typography, codepoint-exact Find (`Ctrl+F`, `Ctrl+G`/`Ctrl+Shift+G`), `स्|स` virama cursor stepping in Devanagari conjuncts, `GoldenDict` lookup (`Alt+G`), `Ctrl+S` save, IntelliJ IDEA & VS Code file links, and shared `diff_san` theme settings.
