Difference generator compares two files and outputs the result in three different style: stylish, plain and json.
Used with the terminal.
Json and yaml formats are supported.
Clone this repo or download it with pip:
git clone /~https://github.com/zluuba/difference-generator.git
pip install --user git+/~https://github.com/zluuba/difference-generator.git
Install package and dependencies:
cd difference-generator
make install
make build
make package-install
gendiff [-h] [-f FORMAT] first_file second_file
-h, --help # print help text
-f, --format # set output format
# Outputs brief documentation for how to invoke the program
gendiff --help
# Show the differences between two files with stylish formatter
# P.S. stylish is the default formatter, but you can specify it:
# gendiff -f stylish file1.json file2.json
gendiff file1.json file2.json
# Show the differences between two files with plain formatter
gendiff -f plain file1.json file2.json
# Show the differences with json formatter
gendiff -f json file1.yml file2.yml
You can also compare json and yaml file formats in the same command, for example:
gendiff file1.yml file2.json