Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.96 KB

README.md

File metadata and controls

67 lines (45 loc) · 1.96 KB

Differ

tests-check Maintainability Test Coverage

About

This project is a console utility that finds the difference between two files. This utility can work with such data formats as: JSON, YAML, YML. You can also see the comparison result in different output formats, for example: stylish, plain, json. The default output format is stylish. If the files do not exist, the utility will notify you about it.

Prerequisites

  • Linux, MacOS, WSL
  • PHP >=8.3
  • Composer
  • Make
  • Git

Libraries

  • php-cli-tools
  • docopt
  • functional-php
  • yaml

Install project

Downloading the utility and installing dependencies:

git clone https://github.com/NikolaiProgramist/Differ.git
cd php-project-48
make install

Give the binary file execution rights:

sudo chmod +x bin/gendiff

Run

To use the utility, run the binary file and specify the output format (stylish by default). Also pass the paths to the two files you need:

bin/gendiff --format=stylish file1.json file2.json

You can also choose the second output format plain:

bin/gendiff --format=plain file1.json file2.json

Instead of the flag --format, you can use the short version -f.

Examples:

asciicast

Stargazers over time

Stargazers over time