-
Notifications
You must be signed in to change notification settings - Fork 10
Understanding reportGenerator.py
This page explains what reportGenerator.py does
To start off, this module generates a audit ready report by converting all the information stored in the spreadsheet into something that the top management can understand at a glance, with technical details for the administrator as well so as to remediate any shortcomings
-
A4from reportlab.lib.pagesizes to set the page size as that of the standard A4 dimensions -
canvasfrom reportlab.pdfgen to write stuff into the A4 page -
readerfrom csv to read the data stored in the CSV
-
colorPassRGB value for the color of the text that indicates PASS -
colorFailRGB value for the color of the text that indicates FAIL -
colorWarnRGB value for the color of the text that indicates CHEK -
colorPrimaryRGB value for the primary color used in the document -
colorSecondaryRGB value for the secondary color used in the document
-
setInfoSets the following information into the metadata of the created document- Author
- Creator
- Producer
- Subject
-
makeOutlineSets a navigable outline panel where all the individual result and it's page number is displayed -
drawBorderDraws the border on the page with the specified color -
makeTitleMakes the first page of the report where the organization, system ID, result, and the name of the auditor is printed -
makeResultMakes the page that displays the test start and finish times -
makeIntroMakes the page(s) that print out the options that were given during the program execution -
makeIndexMakes the index page(s), that contains the recommendation numbers that were tested, the result and the message -
makeBodyMakes dedicated page(s) for each and every control that was tested, explaining what was checked and why the result that is displayed was arrived at -
createPDFThe function that calls all the above functions to generate a PDF from the CSV that is given as input -
generatePDFThe function that concurrently callscreatePDFfor all the reports that need to be generated from the spreadsheet(s) given as input