Repository navigation
Releases
Releases · mrzroot/paknevis
paknevis v0.1.0
پاکنویس — Persian text linter and auto-fixer (Prettier/ESLint for Persian writing).
🧪 Playground: https://mrzroot.github.io/paknevis/
Install
paknevis is not on PyPI. Install it from this release or from Git:
pip install https://github.com/mrzroot/paknevis/releases/download/v0.1.0/paknevis-0.1.0-py3-none-any.whl
# or
pip install "git+https://github.com/mrzroot/paknevis@v0.1.0"paknevis check docs/ # report problems
paknevis fix --diff notes.md # preview fixes
paknevis fix . # apply fixesFirst public release.
Added
- 25 rules in five categories, each with an id, severity, bilingual (FA/EN) explanation, examples and an autofix where safe:
- characters:
arabic-yeh,arabic-kaf,non-persian-heh,arabic-teh-marbuta(report-only by default),arabic-digits,digit-style(Persian/Latin/keep). - zwnj:
zwnj-cleanup,zwnj-mi-prefix,zwnj-plural,zwnj-comparative,zwnj-heh-suffix(withezafe = "zwnj" | "hamza"). - punctuation:
persian-comma,persian-semicolon,persian-question-mark,space-before-punctuation,space-after-punctuation,bracket-spacing,persian-quotes,ellipsis,repeated-punctuation. - whitespace:
multiple-spaces,trailing-whitespace(keeps Markdown hard breaks),kashida. - spelling:
spelling(curated YAML dictionary, extensible via config) andtanvin.
- characters:
- Syntax-aware protection for plain text, Markdown, HTML and LaTeX (XePersian
\lr{…},latin/LTRenvironments, math, verbatim, commands and their arguments). - Inline directives:
paknevis-disable/paknevis-enable,paknevis-disable-line,paknevis-disable-next-line. - Optional
.docxsupport (paknevis[docx]) that preserves run formatting. - Python API:
paknevis.fix(),paknevis.lint(),Linter,Config,load_config(). - CLI:
paknevis check|fix|rules|explainwith--check,--diff, JSON/GitHub/concise output,--fail-on, Persian messages (--lang fa), stdin support, glob/directory discovery and configuration viapyproject.tomlor.paknevis.toml. - pre-commit hooks (
paknevis,paknevis-check) and a composite GitHub Action. - Browser playground on GitHub Pages running the real package via Pyodide (RTL-first, dark/light, Persian/English UI, self-hosted Vazirmatn).
- Test suite with golden before/after fixtures and Hypothesis property tests (idempotency, protected regions).