The second project written for the academic purposes of a Hexlet's course on learning a programming language Python.
Gendiff is the Difference Generator is a program that looks for differences between two files.
- Suppported formats: YAML, JSON
- The following output formats are available: json, plaind and stylish
- Can be used as CLI tool or library
python3 -m pip install git+https://github.com/sudobooo/python-project-lvl2
from gendiff import generate_diff
diff = generate_diff(file_path1, file_path2, format_name)
print(diff)
Default argument for format format_name='stylish'
gendiff -h
usage: gendiff [-h] [-f FORMAT] first_file second_file
Generate diff
positional arguments:
first_file
second_file
optional arguments:
-h, --help show this help message and exit
-f FORMAT, --format FORMAT
set format of output