Skip to content
A cli tool to compare files, folders, and http response.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests make compatible with both Python2 and Python3 Mar 23, 2017
xdiff strip if value is string Apr 12, 2017
.gitignore first commit Mar 23, 2017
LICENSE first commit Mar 23, 2017
README.md add support for ignore keys: difference of ignore keys will be ignored Apr 11, 2017
main.py
setup.cfg add setup.cfg Mar 23, 2017
setup.py update setup.py Mar 23, 2017

README.md

XDiff

A CLI tool to compare data structures, files, folders, http responses, etc.

Install

$ python setup.py install

Usage

$ xdiff -h
usage: xdiff [-h] [--log-level LOG_LEVEL]
             [--compare-files COMPARE_FILES [COMPARE_FILES ...]]
             [--compare-folders COMPARE_FOLDERS [COMPARE_FOLDERS ...]]

A CLI tool to compare data structures, files, folders, http responses, etc.

optional arguments:
  -h, --help            show this help message and exit
  --log-level LOG_LEVEL
                        Specify logging level, default is INFO.
  --compare-files COMPARE_FILES [COMPARE_FILES ...]
                        Specify origin file and new file to be compared.
  --compare-folders COMPARE_FOLDERS [COMPARE_FOLDERS ...]
                        Specify origin folder and new folder to be compared.

Examples

Compare two files.

$ xdiff --compare-files 20170410223650/200/slug111.json 20170410202558/200/slug111.json

Compare files in two folders.

$ xdiff --compare-folders 20170410223650 20170410202558

Compare files in two folders, and ignore specified keys.

$ xdiff --compare-folders 20170410223650 20170410202558 --ignore-keys 'overview, faq, cover, photo, uuid, photos'
You can’t perform that action at this time.