5
5
## About
6
6
7
7
This project is a console utility that finds the difference between two files.
8
- This utility can work with such data formats as: ** JSON** , ** YAML** , ** YML** .
9
- You can also see the comparison result in different output formats, for example: ** stylish** , ** plain** , ** json** .
10
- The default output format is ** stylish** .
8
+ This utility can work with such data formats as: ` JSON ` , ` YAML ` , ` YML ` .
9
+ You can also see the comparison result in different output formats, for example: ` stylish ` , ` plain ` , ` json ` .
10
+ The default output format is ` stylish ` .
11
11
If the files do not exist, the utility will notify you about it.
12
12
13
13
## Prerequisites
@@ -18,21 +18,47 @@ If the files do not exist, the utility will notify you about it.
18
18
+ Make
19
19
+ Git
20
20
21
- ## Install
21
+ ## Libraries
22
+
23
+ + php-cli-tools
24
+ + docopt
25
+ + functional-php
26
+ + yaml
27
+
28
+ ## Install project
29
+
30
+ Downloading the utility and installing dependencies
22
31
23
32
``` bash
24
33
git clone https://github.com/NikolaiProgramist/php-project-48.git
25
34
cd php-project-48
26
35
make install
27
36
```
28
37
38
+ Give the binary file execution rights
39
+
40
+ ``` bash
41
+ sudo chmod +x bin/gendiff
42
+ ```
43
+
29
44
## Run
30
45
46
+ To use the utility, run the binary file and specify the output format (` stylish ` by default).
47
+ Also pass the paths to the two files you need.
48
+
49
+ ``` bash
50
+ bin/gendiff --format=stylish file1.json file2.json
51
+ ```
52
+
53
+ You can also choose the second output format ` plain `
54
+
31
55
``` bash
32
- php bin/gendiff --format=stylish file1.json file2.json
56
+ bin/gendiff --format=plain file1.json file2.json
33
57
```
34
58
35
- ## Examples in asciinema:
59
+ Instead of the flag ` --format ` , you can use the short version ` -f `
60
+
61
+ ## Examples:
36
62
37
63
[ ![ asciicast] ( https://asciinema.org/a/703225.svg )] ( https://asciinema.org/a/703225 )
38
64
0 commit comments