Skip to content

This utility generates a difference of two files with various output formats

Notifications You must be signed in to change notification settings

Matheria/Gendiff

Repository files navigation

Gendiff utility

Actions Status Linter check and test Maintainability Test Coverage

About

This utility generates a difference of two files with various output formats

Supported files:

  • JSON (.json file extension)

  • YAML (.yml and .yaml)

Output formats:

  • stylish (default) — handy diff tree with + and - change notation
  • plain — human-readable report: what happened with items
  • json — JSON-compatible output of the internal difference tree

Install

git clone https://github.com/Matheria/frontend-project-lvl2.git
make install

Usage

Usage: gendiff [options] <filepath1> <filepath2>

Compares two configuration files and shows a difference

Options:
  -V, --version        output the version number
  -f, --format <type>  output format (choices: "json", "plain", "stylish", default: "stylish")
  -h, --help           display help for command

Examples of work

Two flat json-files comparsion

asciicast

Two flat yaml-files comparsion

asciicast

Nested structures (JSON & YAML) in stylish format

asciicast

Nested structures (JSON & YAML) in plain format

asciicast

Nested structures (JSON & YAML) in json format

asciicast

About

This utility generates a difference of two files with various output formats

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published