properties-diff
properties-diff is a command line tools 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.
properties-patch is a command line tools to patch a properties files with one or more properties files to add, update or delete some properties.
Install
Install the latest release from PyPI
$ pip3 install properties-diff
$ properties-diff path/to/file.properties path/to/another/file.properties
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
Usage
$ properties-diff --help 130
usage: properties-diff [-h] [-q] [--quote] [--sep SEP] [-m {simple,diff,wdiff}] [-A] [-D] [-U] 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
-U, --updated print updated properties
$ properties-patch --help
usage: properties-patch [-h] [-c] [--comments] [-f] [-i] [--quote] [--sep SEP] [-A] [-D] [-U] -p patch.properties [-o output.properties] source.properties
positional arguments:
source.properties file to modify
optional arguments:
-h, --help show this help message and exit
-c, --color print colors
--comments insert comment when property is added, updated or deleted
-f, --force force output file (--output) overwrite if it already exists
-i, --interactive ask for confirmation to add, update or delete a property
--quote use double quotes for values, example: foo="bar"
--sep SEP key/value separator, default is '='
-p patch.properties, --patch patch.properties
patch file
-o output.properties, --output output.properties
modified file
-A, --add add new properties from patches
-D, --delete delete properties not in patches
-U, --update update properties from patches
properties-diff modes
You can see differences between the properties files using 3 modes using --mode <MODE> or -m <MODE>
wdiff, prints the changes likewdifftool would do (this is the default mode)diff, prints the changes likedifftool would dosimple, based on colors, red for removed lines, green for added lines
Metadata
Release files for properties-diff 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| properties-diff-0.4.1.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| properties_diff-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / properties-diff-0.4.1.tar.gz
| Download URL | properties-diff-0.4.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57c86a5222b3f760802bec2625b317fa053d18f01b63d4a9c488ad5de38061b4
|
|
BLAKE2b-256 checksum How to use checksums |
bd32a81504a1b2ecbcd5541edb7e061ab6e34e27911eac5a515a6c6c64ed767e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1021-azure
|
Release files / properties_diff-0.4.1-py3-none-any.whl
| Download URL | properties_diff-0.4.1-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fda8e57eba4cac7c86594e753a1b5b9d2f82952d89aa9ad935918d3f1a686b2
|
|
BLAKE2b-256 checksum How to use checksums |
89f31dc3e6c12ec6425339b106afcc0368f8668ddf55efdde971c31c8a56fd1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1021-azure
|