Skip to content
/ gendiff Public

CLI application for calculating diff between 2 text files via recursive algorithm

Notifications You must be signed in to change notification settings

tmvfb/gendiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gendiff

Actions Status Github Actions Status Maintainability Test Coverage

Tools used

Tool Description
poetry "Python dependency management and packaging made easy"
CodeClimate Quality "Your single solution for code quality"
Flake8 "Your tool for style guide enforcement"
pytest "pytest: helps you write better programs"
GitHub Actions "Automate your workflow from idea to production"

Description

The package contains Linux CLI application that generates diff between two files with either flat or nested structure.
Application builds diff in the form of python dict of dicts via recursive search algorithm, and provides an output in the desired format.

Supported input formats:

  1. json (demo with default output format)
  2. yaml (demo with default output format)

Output formats:

  1. stylish (default format, demo)
  2. plain (demo)
  3. json (demo)

Prerequisites

  • Linux or WSL
  • git
  • Python >=3.8.1
  • pip >=19.0
  • poetry >=1.2.0

Installation and usage

  1. git clone https://github.com/tmvfb/gendiff.git
  2. cd gendiff
  3. make install

Check if app is properly installed by running the following in the command line:

show_diff -f stylish ./tests/fixtures/tree1.yaml ./tests/fixtures/tree2.yml

Type show_diff -h for help.
For different output formats use following commands:

  • show_diff -f stylish file1 file2
  • show_diff -f plain file1 file2
  • show_diff -f json file1 file2

Acknowledgements

Made as a project for hexlet.io python course.

About

CLI application for calculating diff between 2 text files via recursive algorithm

Resources

Stars

Watchers

Forks

Packages

No packages published