A script made for Samaritan infrastructure issue #14. Uses Cyclonedx-bom to create a Bill of Materials (bom).
This is for projects that have not one, but multiple requirements scattered throughout the project.
Cyclonedx is configured to work with one requirements.txt file in one directory. This script compiles
all the requirements.txt files into one, and generates a bom.xml file which is the Software Bill Of Material
generated by Cyclonedx.
See for more details about Cyclonedx:
https://github.com/CycloneDX
https://cyclonedx.org/
Run pip install -r requirements.txt or pip install cyclonedx-bom
Run the python script by changing your current working directory to the project directory of this project.
Run the script with the command python compile_bom_from_py_requirements.py.
Select Choice 1 and enter the directory of the project you want to parse for requirements.
You should see a new folder created in your current working directory called Mother_Of_All_Requirements.
This new folder is where your bill of materials as bom.xml and compiled requirements.txt is located.
Enjoy!