🎉 New Features
🛠️ Command Line Interface (CLI)
A powerful and flexible command-line interface (CLI) has been added to `pdz-tool`, enabling users to parse and convert PDZ files directly from the terminal into JSON and/or CSV formats. This streamlines the workflow by providing an easy-to-use CLI for all operations previously available only through code.
How to Use
Once the package is installed, users can run `pdz-tool` from the command line to parse PDZ files.
CLI Options
- **`file_path`** (required): Path to the PDZ file to be parsed.
- **`--output-dir`**: Specify the directory where the parsed JSON and CSV files will be saved. Defaults to the current working directory.
- **`--output-format`**: Choose the output format of the parsed files. Options:
- `json` - Save output as JSON.
- `csv` - Save output as CSV.
- `all` (default) - Save both JSON and CSV.
- **`--verbose`**: Enable verbose mode for detailed processing logs.
- **`--debug`**: Enable debug mode for additional details about the PDZ structure, including PDZ version, bytes, and record types.
- **`--version`**: Display the current version of the `pdz-tool` CLI.
🚀 Improvements
- **Enhanced User Interaction**: The addition of CLI options allows for easy parsing and format selection, making the tool highly user-friendly and adaptable to different workflows.
- **Debug and Verbose Modes**: Improved debugging capabilities and more informative logging through `--debug` and `--verbose` flags.
🐛 Bug Fixes
- Improved error handling when parsing PDZ files to ensure proper parsing and conversion without crashes.
- Fixed minor issues with data formatting in CSV and JSON outputs.
📝 Documentation
- Updated the `README.md` to reflect the new CLI usage and options.
- Added examples for using the CLI effectively.