Pdz-tool

Latest version: v0.2.2

Safety actively analyzes 707299 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.2

🔥 What's New
- **Proposal for 7**: Added `channel_start_kev` as a calculated column for spectra in CSV exports. This enhances data usability by including precise energy calibration. 🎯
📌 Implemented by [larsmaxfield](https://github.com/larsmaxfield) in [#8](https://github.com/bducraux/pdz-tool/pull/8).

🔗 **Full Changelog**: https://github.com/bducraux/pdz-tool/compare/v0.2.1...v0.2.2

0.2.1

This release brings exciting new features, critical fixes, and enhancements to improve your experience with the PDZ Tool. 🎉

✨ What's New
- **Image Handling Enhancements**:
- Added `save_images` and `get_image_bytes` methods.
- Improved handling of image bytes with a new demo example and PDZ compatibility.
- [View PR 6](https://github.com/bducraux/pdz-tool/pull/6) by [larsmaxfield](https://github.com/larsmaxfield).

🛠️ Fixes and Improvements
- **Verbose & Debug Mode Fix**:
- Resolved [Issue 1](https://github.com/bducraux/pdz-tool/issues/1).
- Passed `verbose` and `debug` directly to `super()` in `PDZ25Tool` and `PDZ24Tool` initializations.
- [View PR 2](https://github.com/bducraux/pdz-tool/pull/2) by [larsmaxfield](https://github.com/larsmaxfield).

- **CSV Export Update**:
- Modified `save_csv` to accept a list of record names, enabling the export of multiple records into a single CSV file.
- [View PR 4](https://github.com/bducraux/pdz-tool/pull/4) by [larsmaxfield](https://github.com/larsmaxfield).

🌟 New Contributors
- A warm welcome to [larsmaxfield](https://github.com/larsmaxfield), who made their first contribution in [PR #6](https://github.com/bducraux/pdz-tool/pull/6)! 👏

🔗 Full Changelog
Check out the detailed changes in [v0.2.1 Changelog](https://github.com/bducraux/pdz-tool/compare/v0.2.0...v0.2.1).

0.2.0

🎉 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.

0.1.0

🚀 New Features
This is the first official release of pdz-tool, a Python-based utility that parses PDZ files and converts them into CSV or JSON formats.

🎉 Highlights:
PDZ File Parsing: Supports PDZ24 and PDZ25 file formats, extracting key data and attributes from these files.
Flexible Data Export: Ability to save parsed data into JSON or CSV format for easy analysis and use in other tools.
Verbose & Debug Mode: Enable verbose logging for detailed output or debug mode to see stack traces for easier troubleshooting.
📦 Package Details:
Supported Formats: PDZ24, PDZ25
Output Formats: CSV, JSON
Python Version: >=3.11

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.