Python CLI tool and library for diffing CSV and JSON files
APACHE-2.0 License
Bot releases are visible (Hide)
Published by simonw about 4 years ago
--show-unchanged
option for outputting the unchanged values of rows that had at least one change. #9.
character. #7--key
provided - thanks, @MainHanzo. #3;
delimited files. #6Published by simonw over 4 years ago
--format=tsv
or --format=csv
options to over-ride the automatic detection. Thanks, Thomas Sibley for contributing this new feature. (#4)Published by simonw over 5 years ago
Tweaked output formatting of added/removed columns for better consistency with added/removed/changed rows.
Published by simonw over 5 years ago
Handle columns being added and removed
My sf-tree-history project unexpectedly broke because the columns in the CSV file changed.
https://circleci.com/gh/simonw/sf-tree-history/110
csv-diff
can now detect and handle this without crashing.
Example commit: https://github.com/simonw/sf-tree-history/commit/781d7c4abf5d0022609a2b20cd3d5f5616826835
Published by simonw over 5 years ago
--singular
and --plural
options, closes #2
Published by simonw over 5 years ago
Added and deleted rows now display in a more human-friendly format than raw JSON:
$ csv-diff one.csv two.csv --key=id
1 row changed, 1 row added, 1 row removed
1 row changed
Row 1
age: "4" => "5"
1 row added
id: 3
name: Bailey
age: 1
1 row removed
id: 2
name: Pancakes
age: 2
Example commit here: https://github.com/simonw/sf-tree-history/commit/184efa - compare with https://github.com/simonw/sf-tree-history/commit/dd08cc which demonstrates the previous behaviour.
Published by simonw over 5 years ago
Changed the order of the human text output: it's now changed, added, removed
I did this so that this commit message would be more interesting to read once GitHub truncated it.
Published by simonw over 5 years ago