https://github.com/luciopaiva/props-diff
Console tool made in Node.js that compares two TSV files containing properties (i.e., a collection of key-value pairs) and shows an HTML summary of the comparison, highlighting fields that differ and that are also missing.
https://github.com/luciopaiva/props-diff
Last synced: about 1 month ago
JSON representation
Console tool made in Node.js that compares two TSV files containing properties (i.e., a collection of key-value pairs) and shows an HTML summary of the comparison, highlighting fields that differ and that are also missing.
- Host: GitHub
- URL: https://github.com/luciopaiva/props-diff
- Owner: luciopaiva
- Created: 2019-11-05T14:36:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T20:56:06.000Z (almost 6 years ago)
- Last Synced: 2025-03-21T20:47:06.068Z (7 months ago)
- Language: HTML
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# props-diff

Console tool made in Node.js that compares two TSV files containing properties (i.e., a collection of key-value pairs) and shows an HTML summary of the comparison, highlighting fields that differ and that are also missing.
Useful for comparing configurations of different system environments (helps answering the question of why some bug manifests in production but not in staging, for instance).
For security reasons, fields whose names mention "password" or "secret" have their values automatically removed from the output HTML.
This tool is still in its early stages, so some assumptions are made:
- files are in TSV format
- files are encoded in UTF-8
- columns are **not** surrounded by quotes
- first row is **not** headers, but data## How to use
You must have `nvm` installed. To install props-diff:
nvm install
npm installThen run it:
node props-diff
First two params are the paths to the files to compare, the third param is the index of the column supposed to contain the name and the fourth param is the index of the column that holds the value. Column indexes are zero-based.
Example (check the samples directory):
node props-diff.js samples/foo.tsv samples/bar.tsv 0 1
## To do
- get rid of the Node.js part, make it work using only the browser