Command line tool to compare properties files
Project description
properties-diff
Command line tool to compare properties files and print differences with colors as if you were using wdiff
or diff
tools.
Even if properties files are text files, using directly diff
is not that efficient because of key/value pairs order or format (for example using =
or [space]=[space]
as separator, double quoting values...). properties-diff
compare key/value pairs but not the order nor the format.
Usage
$ properties-diff tests/sample1.properties tests/sample2.properties -h
usage: properties-diff [-h] [-q] [--quote] [--sep SEP] [-m {simple,diff,wdiff}] [-A] [-D] [-M] left.properties right.properties
positional arguments:
left.properties left file to compare
right.properties right file to compare
optional arguments:
-h, --help show this help message and exit
-q, --quiet print less information
--quote use double quotes for values, example: foo="bar"
--sep SEP key/value separator, default is '='
-m {simple,diff,wdiff}, --mode {simple,diff,wdiff}
select a format to show differences: using colors only (simple), using diff-like format (diff) or wdiff-like (wdiff) format. Default is 'wdiff'
-A, --added print added properties
-D, --deleted print deleted properties
-M, --modified print modified properties
Modes
You can see differences between the properties files using 3 modes using --mode <MODE>
or -m <MODE>
wdiff
, prints the changes likewdiff
tool would do (this is the default mode)diff
, prints the changes likediff
tool would dosimple
, based on colors, red for removed lines, green for added lines
Install
Install from the sources
$ pip3 install --user --upgrade git+https://github.com/essembeh/properties-diff
$ properties-diff path/to/file.properties path/to/another/file.properties
Install the latest release from PyPI
$ pip3 install --user --upgrade properties-diff
$ properties-diff path/to/file.properties path/to/another/file.properties
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
properties-diff-0.3.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for properties_diff-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f2bcb1ea65a6c26748ec99147aec6098590d1d44094643e4e84dd5c30fead8 |
|
MD5 | 466b2bd19901b1e9b8d16ed4b1bada3f |
|
BLAKE2b-256 | 31f816fc9e62b90def4c0a57282ffb0ad683a3133d82742770741615c8efcf68 |