Simonw Csv Diff Versions Save

Python CLI tool and library for diffing CSV and JSON files

1.1

3 years ago
  • Tool now also works against inputs that are JSON files consisting of a list of objects with identical keys, using --format=json. #12

1.0

3 years ago
  • New --show-unchanged option for outputting the unchanged values of rows that had at least one change. #9
  • Fix for bug with column names that contained a . character. #7
  • Fix for error when no --key provided - thanks, @MainHanzo. #3
  • CSV delimiter sniffer now ; delimited files. #6

0.6

4 years ago
  • Support for TSV files. The tool will automatically detect if the input is CSV or TSV, or you can use the new --format=tsv or --format=csv options to over-ride the automatic detection. Thanks, Thomas Sibley for contributing this new feature. (#4)

0.5.1

5 years ago

Tweaked output formatting of added/removed columns for better consistency with added/removed/changed rows.

0.5

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

0.4

5 years ago

--singular and --plural options, closes #2

0.3.1

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.

0.2

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.

0.1

5 years ago