Welcome to the Gendiff console utility. This utility shows a difference between 2 configuration files. It supports JSON (.json) and YAML (.yaml, *.yml) formats of config files.
You can also use this package as python module that provides function: generate_diff(filepath_1, filepath_2, format) It takes paths of 2 yaml or json files and format of difference output and returns difference report in chosen format as a string. Available formats: 'stylish' (default), 'plain', 'json', 'yaml'.
- Linux
- Python 3.10+
- Poetry
- Clone the repository with command:
git clone git@github.com:AIGelios/python-project-50.git
- Choose a working directory with command
cd python-project-50/
- Make installation with command
python-project-50$ make full-install
Use this command in your terminal:
gendiff file_path_1 file_path_2 [--option]
available options: -h, --help : information about utility, available commands, etc. -f --format : format of files difference output. Available formats: 'stylish' (default), 'plane', 'json', 'yaml'.
Command examples:
gendiff file1.json file2.json
gendiff file2.yaml file1.yml -f stylish
gendiff file3.json file4.json --format plain
gendiff -h
python-project-50$ make package-uninstall
and then remove the directory of thew project with commands:
python-project-50$ cd ..
$ rm -r python-project-50 --force