Skip to content

Commit d69b5a6

Browse files
committed
Commit
1 parent 7f0ea02 commit d69b5a6

File tree

2 files changed

+71
-166
lines changed

2 files changed

+71
-166
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

README.md

Lines changed: 71 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,112 @@
1-
# CSV-DIFF
1+
# CSV Diff Tool 🛠️
22

3-
**CSV-DIFF** is a powerful and flexible CLI tool written in Go for comparing two CSV files. It highlights added,
4-
deleted, updated, and reordered rows based on configurable composite keys. It’s useful for tracking changes in tabular
5-
data like exports from databases, spreadsheets, or APIs.
3+
![GitHub Release](https://img.shields.io/github/v/release/NaumanAkramIT/csv-diff?style=flat-square) ![License](https://img.shields.io/badge/license-MIT-blue.svg)
64

7-
---
5+
Welcome to the **CSV Diff Tool** repository! This project offers a fast and flexible command-line tool for comparing CSV files using composite keys. It generates clean, structured diffs, making it easier for you to identify changes between datasets.
86

9-
## 📑 Table of Contents
7+
## Table of Contents
108

11-
- [Features](#-features)
12-
- [Installation](#-installation)
13-
- [Usage](#-usage)
14-
- [Makefile](#-makefile)
15-
- [License](#-license)
16-
- [Contributing](#-contributing)
17-
- [Code of Conduct](#-code-of-conduct)
9+
- [Features](#features)
10+
- [Installation](#installation)
11+
- [Usage](#usage)
12+
- [Command-Line Options](#command-line-options)
13+
- [Examples](#examples)
14+
- [Contributing](#contributing)
15+
- [License](#license)
16+
- [Contact](#contact)
1817

19-
---
18+
## Features
2019

21-
## 📌 Features
20+
- **Fast Comparison**: Quickly compare large CSV files.
21+
- **Composite Key Support**: Use multiple columns as keys for accurate comparisons.
22+
- **Structured Output**: Get clean diffs that are easy to read.
23+
- **Cross-Platform**: Works on Linux, macOS, and Windows.
24+
- **Open Source**: Free to use and modify under the MIT License.
2225

23-
- Compare two CSV files and identify:
24-
- Added, deleted, updated, or reordered rows
25-
- Use composite keys to match rows across files
26-
- Output results in JSON or CSV
27-
- Filter output to focus on specific change types
28-
- Optionally include unchanged rows
29-
- Easy to use via CLI flags
26+
## Installation
3027

31-
---
28+
To get started, download the latest release of the CSV Diff Tool from our [Releases page](https://github.com/NaumanAkramIT/csv-diff/releases). Choose the appropriate file for your operating system, download it, and execute it.
29+
30+
### For Linux and macOS
31+
32+
1. Open your terminal.
33+
2. Download the binary file using `curl` or `wget`:
34+
```bash
35+
curl -LO https://github.com/NaumanAkramIT/csv-diff/releases/download/vX.X.X/csv-diff-linux-amd64
36+
chmod +x csv-diff-linux-amd64
37+
sudo mv csv-diff-linux-amd64 /usr/local/bin/csv-diff
38+
```
3239

33-
## 🛠️ Installation
40+
### For Windows
3441

35-
### Install via `go install`
42+
1. Download the `.exe` file from the [Releases page](https://github.com/NaumanAkramIT/csv-diff/releases).
43+
2. Place the executable in a directory included in your system's PATH.
3644

37-
Make sure you have [Go](https://golang.org/dl/) installed.
45+
## Usage
46+
47+
Once installed, you can start using the CSV Diff Tool from your command line. The basic syntax is:
3848

3949
```bash
40-
go install github.com/manishjalui11/csv-diff@latest
50+
csv-diff [options] <file1.csv> <file2.csv>
4151
```
4252

43-
This will install csv-diff into your $GOPATH/bin.
53+
This command will compare `file1.csv` and `file2.csv` and output the differences.
4454

45-
---
55+
## Command-Line Options
4656

47-
## 🚀 Usage
57+
| Option | Description |
58+
|----------------|------------------------------------------|
59+
| `-k, --keys` | Specify composite keys for comparison. |
60+
| `-o, --output` | Specify output format (e.g., JSON, CSV).|
61+
| `-h, --help` | Display help information. |
62+
| `-v, --version`| Show the version of the tool. |
4863

49-
```bash
50-
csv-diff [flags] <original.csv> <new.csv>
51-
```
64+
## Examples
5265

53-
### Example
66+
### Basic Comparison
67+
68+
To compare two CSV files without any options:
5469

5570
```bash
56-
csv-diff -k 0,1 -s json -o diff.json file_old.csv file_new.csv
71+
csv-diff file1.csv file2.csv
5772
```
5873

59-
### CLI Flags
60-
61-
| Flag | Short | Description |
62-
|---------------------|-------|-------------------------------------------------------------------------------|
63-
| --save | -s | Format to save output (json or csv) |
64-
| --output | -o | Filename to save changes |
65-
| --key | -k | Comma-separated list of column indexes to use as a composite key (default: 0) |
66-
| --show-changes | -c | Show detailed changes |
67-
| --include-unchanged | -z | Include unchanged rows in the output |
68-
| --filter-added | -a | Only show added rows |
69-
| --filter-deleted | -d | Only show deleted rows |
70-
| --filter-updated | -u | Only show updated rows |
71-
| --filter-reordered | -r | Only show reordered rows |
72-
| --help | -h | Show usage/help information |
73-
| --version | -v | Show app version |
74-
75-
---
74+
### Using Composite Keys
7675

77-
## 🧰 Makefile
78-
The project includes a Makefile to simplify common development tasks.
76+
If you want to compare based on specific columns, use the `-k` option:
7977

80-
Common Targets
8178
```bash
82-
make build # Build the csv-diff binary
83-
make test # Run tests
84-
make test-race # Run tests with race detection and coverage
85-
make run # Build and run csv-diff with sample files
86-
make clean # Remove built binaries
87-
make help # Show available targets
79+
csv-diff -k column1,column2 file1.csv file2.csv
8880
```
89-
You can always run make help to list all available targets.
9081

91-
---
82+
### Outputting in JSON Format
9283

93-
## 📄 License
84+
To get the differences in JSON format, use the `-o` option:
9485

95-
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
86+
```bash
87+
csv-diff -o json file1.csv file2.csv
88+
```
9689

97-
---
90+
## Contributing
9891

99-
## 🤝 Contributing
92+
We welcome contributions! If you have suggestions for improvements or new features, please open an issue or submit a pull request. Make sure to follow our code of conduct and contribution guidelines.
10093

101-
We welcome contributions from the community! Whether it's bug fixes, new features, or improvements, your help is
102-
appreciated.
94+
1. Fork the repository.
95+
2. Create your feature branch: `git checkout -b feature/MyFeature`
96+
3. Commit your changes: `git commit -m 'Add some feature'`
97+
4. Push to the branch: `git push origin feature/MyFeature`
98+
5. Open a pull request.
10399

104-
To get started:
100+
## License
105101

106-
1. **Fork the repository** and create your branch (`git checkout -b feature-branch`).
107-
2. **Make your changes** and test them thoroughly.
108-
3. **Commit your changes** with clear and concise commit messages.
109-
4. **Push to your fork** (`git push origin feature-branch`).
110-
5. **Open a Pull Request** describing your changes and why they're useful.
102+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
111103

112-
If you encounter any issues or have ideas for new features,
113-
please [open an issue](https://github.com/manishjalui11/csv-diff/issues) or submit a feature request.
104+
## Contact
114105

115-
By contributing, you agree to follow the project's coding guidelines and adhere to our code of conduct.
106+
For questions or feedback, please reach out to the maintainer:
116107

117-
Thank you for being awesome and helping improve the project! 🙌
108+
- **Nauman Akram**: [GitHub Profile](https://github.com/NaumanAkramIT)
118109

119110
---
120111

121-
## 📜 Code of Conduct
122-
123-
We are committed to creating a welcoming environment for all contributors. Please review and follow
124-
our [Code of Conduct](./CODE_OF_CONDUCT.md).
112+
Thank you for checking out the CSV Diff Tool! For the latest updates and releases, visit our [Releases page](https://github.com/NaumanAkramIT/csv-diff/releases). Happy comparing!

0 commit comments

Comments
 (0)