Vale CLI Python Wrapper
Vale is an open-source, command-line tool for validating content based on editorial style rules. This package acts as a basic wrapper to pass text to Vale and return styles rules that you can use in your Python projects.
Installation
NOTE: This package only acts as a wrapper for using Vale and does not install Vale. Make sure you install and configure Vale before using this package.
Add vale-cli package as a dependency in your requirements.txt file:
vale-cli
Usage
Example usage:
import vale_cli.vale_config as vale_config
release_note = "An error with the WhizBang API caused incorrect processing of data, which stopped you from using certain routes in the API. This fix corrects the logic around data processing. You can now process data without errors."
vale = vale_config.ValeConfig("/path/to/.vale.ini")
output = vale.check_text(release_note, ext='.adoc')
print(output)
Output:
[{'Action': {'Name': '', 'Params': None}, 'Span': [19, 26], 'Check': 'RedHat.PascalCamelCase', 'Description': '', 'Link': 'https://redhat-documentation.github.io/asciidoc-markup-conventions', 'Message': "Consider wrapping this Pascal or Camel case term ('WhizBang') in backticks.", 'Severity': 'suggestion', 'Match': 'WhizBang', 'Line': 1}, {'Action': {'Name': 'replace', 'Params': ['wrong']}, 'Span': [39, 47], 'Check': 'RedHat.SimpleWords', 'Description': '', 'Link': 'https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/simplewords/', 'Message': "Use simple language. Consider using 'wrong' rather than 'incorrect'.", 'Severity': 'suggestion', 'Match': 'incorrect', 'Line': 1}]
Release files for vale-cli 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vale_cli-0.2.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vale_cli-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / vale_cli-0.2.tar.gz
| Download URL | vale_cli-0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b39cf5b8a96e78762b7601b3a5eb88b57e0e3bf0a13bb984633fa75d4d31d488
|
|
BLAKE2b-256 checksum How to use checksums |
bab4f49039b3c3ff2872c85a1688f3d18876e6277ed68edd51abce90f12f0ac5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.12.4
|
Release files / vale_cli-0.2-py3-none-any.whl
| Download URL | vale_cli-0.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0d68088b2cbb7d76274003dbbc82a87ecfe58f13f5f7118f863cebf98afe52c
|
|
BLAKE2b-256 checksum How to use checksums |
7092e960974de5b2433626917e2ec3fee2fbb10863e317868cc396a7f701df3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.12.4
|