Skip to content

A command line tool to calculate the difference between two data structures. Runs from the command line, compares two configuration files and shows a difference. Working with JSON and YAML. Provides output in stylish, plain and json format.

Notifications You must be signed in to change notification settings

NikGor/python-project-50

Repository files navigation

Difference Calculator

A command line tool to calculate the difference between two data structures. Runs from the command line, compares two configuration files and shows a difference. Working with JSON and YAML. Provides output in stylish, plain and json format.

Usage

help:

$ gendiff -h

Running:

$ gendiff <file_path1> <file_path2> --format <format>

format - optional parameter, default value is 'stylish'. Possible values: 'stylish', 'plain', 'json'.

Setup

using Makefile:

$ make install
$ make build
$ make package-install

Without installation

$ python3 -m gendiff.scripts.gendiff <file_path1> <file_path2> --format <format>

DEMO

Comparison of two files in the JSON format:

asciicast

Comparison of two nested files in the YAML format:

asciicast

Comparison of two files in the JSON format with plain output:

asciicast

Links

This project was built using these tools:

Tool Description
poetry "Python dependency management and packaging made easy"
Py.Test "A mature full-featured Python testing tool"

Hexlet tests and linter status:

Actions Status Github Actions Status Maintainability Test Coverage

About

A command line tool to calculate the difference between two data structures. Runs from the command line, compares two configuration files and shows a difference. Working with JSON and YAML. Provides output in stylish, plain and json format.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published