Generate my Security Report with a Python module.
To make this module works properly, you need to install several external modules.
You need :
Install Python 3 on your operating system following the Python website's instructions.
The easiest way to do this is to use the pip installer.
pip install xlsxwriter or python3.x -m pip install xlsxwriter
pip install python-pptx or python3.x -m pip install python-ppx
To develop this program, I use Visual Studio Code with the Python extension.
Be sure to change your Python interpreter to Python3 as this program was developed for Python3. In Visual Studio Code, you can do this very easily following the instructions here.
Download the zip file from Github or clone the repository.
As Python is an interpreted language, you just need the source files to make it work.
- Describe your phases as root directory.
- Describe the projects and objects you need to follow inside each phase directory.
Your folder hierarchy should be as followed :
The directory of project and object must be described as followed : "Phase - Project Name - Object Name"
The Phase must be one of the following :
- Done
- In Progress
- On Hold
- Not Started
- Not Evaluated
Then you only need to run the writereport.py module in your terminal.
py /path/to/writereport.py --help
Your Excel and Powerpoint reports are located into the 'ReportHistory' folder.
To launch the reports creation in a easier and quicker, you can use alias on macOS and Linux or Powershell Alias on Windows.
See the explanations above. For Windows : https://technet.microsoft.com/en-us/library/ee176913.aspx
change the Execution policy if you don't have any rights to launch powershell profiles : https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&viewFallbackFrom=powershell-Microsoft.PowerShell.Core
For MacOS and Linux : Create the .bash_profile file using the command line program called ‘nano’ if it doesn’t exist:
nano ~/.bash_profile
Add this line the end of your file:
alias writereport='python3 /path/to/writereport.py'
Save your file
ctrl-x y
Refresh the bash shell environment:
source ~/.bash_profile
If you use the fish shell, just type that command:
alias writereport 'python3 /path/to/writereport.py'
or check the documentation here.
📚 Doc : Add explanation on how to create an alias on macOS In order for the user to have a shortcut to the app and don't require to enter the all path the 'writereport.py' python file.
Made with ❤️ in Paris 🇫🇷