Skip to content

DoeDeer/python-project-lvl2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diff generator

Maintainability Build Status Test Coverage

Compare to files for differences.

Usage

Console:

gendiff [-h] [-f FORMAT] first_file second_file

Positional arguments:
first_file: source file with original keys
second_file: changed file with updated keys

Optional arguments:
-h or --help: show help message
-f FORMAT or --format FORMAT: set format of output message. Available choices are: json, json-like and plain. Json-like is pretty formatted json dict with + and - that shows changed, removed and added keys. Json - is valid json string with info dict about all keys. Plain is just test describing keys change.

In code:

from gendiff import gendiff

diff = gendiff(path_to_first_file, path_to_second_file, mode)

Examples

Install and simple usage

asciicast

YAML

asciicast

Complex values

asciicast

Plain output

asciicast

JSON output

asciicast

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors