pospell is a spellchecker for po files containing reStructuredText.
Find a file
2025-06-03 11:53:25 +02:00
tests Tox and github actions. (#24) 2020-11-23 14:26:34 +01:00
.gitignore Git ignore file 2018-07-27 14:57:43 +02:00
.pre-commit-hooks.yaml Add pre-commit hook (#14) 2020-05-22 17:48:57 +02:00
.pylintrc Refactor pospell to use multiprocessing (#32) 2021-11-26 10:26:35 +01:00
.woodpecker.yml Missing hunspell in CI. 2023-11-20 12:02:55 +01:00
CHANGELOG.md Bump to v1.0.12. 2021-04-10 00:12:33 +02:00
pospell.py Pretty print source when it spans multiple lines. 2025-06-03 11:43:16 +02:00
pyproject.toml Move from tox.ini to pyproject.toml. 2025-06-03 11:53:25 +02:00
README.md Update Usage section with up-to-date help. 2025-06-03 11:21:22 +02:00

pospell

pospell is a spellcheckers for po files containing reStructuredText.

Pospell is part of poutils!

Poutils (.po utils) is a metapackage to easily install useful Python tools to use with po files and pospell is a part of it! Go check out Poutils to discover the other tools!

Examples

By giving files to pospell:

$ pospell --language fr about.po
about.po:47:Jr.
about.po:55:reStructuredText
about.po:55:Docutils
about.po:63:Fredrik
about.po:63:Lundh
about.po:75:language
about.po:75:librarie

By using a bash expansion (note that we do not put quotes around *.po to let bash do its expansion):

$ pospell --language fr *.po
…

By using a glob pattern (note that we do put quotes around **/*.po to keep your shell from trying to expand it, we'll let Python do the expansion:

$ pospell --language fr --glob '**/*.po'
…

Usage

usage: pospell.py [-h] [-l LANGUAGE] [--glob GLOB] [--drop-capitalized] [--no-drop-capitalized] [-v] [--version] [--debug] [-p PERSONAL_DICT] [--modified] [-j JOBS]
                  [po_file ...]

Check spelling in po files containing restructuredText.

positional arguments:
  po_file               Files to check, can optionally be mixed with --glob, or not, use the one that fit your needs.

options:
  -h, --help            show this help message and exit
  -l, --language LANGUAGE
                        Language to check, you'll have to install the corresponding hunspell dictionary, on Debian see apt list 'hunspell-*' (defaults to 'fr').
  --glob GLOB           Provide a glob pattern, to be interpreted by pospell, to find po files, like --glob '**/*.po'.
  --drop-capitalized    Always drop capitalized words in sentences (defaults according to the language).
  --no-drop-capitalized
                        Never drop capitalized words in sentences (defaults according to the language).
  -v, --verbose         More output, use -vv, -vvv, and so on.
  --version             show program's version number and exit
  --debug
  -p, --personal-dict PERSONAL_DICT
  --modified, -m        Use git to find modified files.
  -j, --jobs JOBS       Number of files to check in paralel, defaults to all available CPUs

A personal dict (the -p option) is simply a text file with one word per line.

Contributing

You can work in a venv, to install the project locally:

python -m pip install .

And to test it locally:

python -m pip install tox
tox -p all