(GENerator of DIFFerences) The cli package gives diff between two files.
This is a second level project. created as part of the Hexlet training course to prepare a Python Web developer.
- Supported input formats: YAML, JSON
- Report generation as plain text, structured text and JSON
- Usage as CLI util or library function
Use the package manager pip to install GenDiff.
pip install --extra-index-url https://test.pypi.org/simple/ nonvme-gendiff
from gendiff import generate_diff
diff = generate_diff(file_path1, file_path2)
print(diff)
usage: gendiff [-h] [-f {prety,plain,json}] first_file second_file
Generate diff
positional arguments:
first_file
second_file
optional arguments:
-h, --help show this help message and exit
-f {prety,plain,json}, --format {prety,plain,json}
set format of output