This is a PHP-based CSV/TSV file parser and processor that allows you to parse CSV and TSV files, create Product objects, and generate unique combinations with counts.
- Supports both CSV and TSV file formats.
- Parses the input file row by row into Product objects.
- Generates unique combinations of data fields with counts.
- Outputs the unique combinations to a specified file.
- PHP 7 or higher installed on your system.
-
Clone this repository to your local machine:
git clone https://github.com/uresh/php-cmd-file-parser.git
-
Navigate to the project directory:
cd csv-tsv-parser
-
Run the parser.php script with the following command, replacing
<input-file>
and<output-file>
with your file paths:php parser.php --file <input-file> --unique-combinations <output-file>
Example:
php parser.php --file example.csv --unique-combinations combination_count.csv
-
The script will process the input file, display Product objects, and create an output file with unique combinations and counts.
This project is licensed under the MIT License - see the LICENSE file for details.
This README provides an overview of the project, instructions for getting started, and details on how to run the script. Make sure to replace `<input-file>` and `<output-file>` with actual file paths, and customize it further if needed to suit your project's specific requirements.