This Python script allows users to convert JSON reports downloaded from Caldera into readable, formatted PDF documents. The script uses the ReportLab library to generate the reports.
- Python 3.x
- Access to Caldera JSON reports
-
First, clone this repository to your local machine using:
git clone https://github.com/marksowell/caldera-report-generator.git cd caldera-report-generator
-
Install the required Python package ReportLab which is used for generating PDF files:
pip install reportlab
To generate a PDF report from a Caldera JSON report:
-
Prepare Your JSON File: Ensure that you have a Caldera JSON report saved locally. For example,
report.json
. -
Run the Script: Use the following command to generate a PDF report. Replace
/path/to/your/report.json
with the path to your Caldera JSON report.python generate_report.py /path/to/your/report.json
The script will generate a uniquely named PDF file in the current directory, incorporating the operation's name with the report generation's date and time.
The script dynamically creates a PDF document with a filename in the format operation_name_caldera_report_YYYY_MM_DD_HHMMSS.pdf
. Each report includes:
- Host information such as hostname, username, and IP addresses.
- Details of executed commands, their status, and timings.
- Dependency Errors: If you encounter errors related to missing packages, make sure you have run the
pip install reportlab
command correctly. - File Not Found: Ensure the JSON path is correct and accessible to the script.
Contributions are welcome! Feel free to fork the repository and submit pull requests.
- Bug Reports: Issues are tracked as GitHub issues. Tag it as a bug and include as much detail as possible to replicate the issue.
- Feature Requests: Feel free to add feature requests by opening an issue. Tag it as a feature request.
This project is licensed under the MIT License - see the LICENSE file for details.