I need to review and approve firewall rule requests. I can get a list of those pending approval, ones requesting a modification to existing rules, those pending removal because they've expired (all rules must be reviewed on at least a yearly basis), ones on hold, ones that are in a "clarification required" state due to a question about the rules being requested, those approved for implementation, but not yet implemented, and those awaiting removal. But the page that displays the requests in each category doesn't give me a count of the number in each category, so I wrote a Python script that will read the webpage containing that information that I've downloaded, parse the HTML code for the page and give me a count of the number of requests in each category.
The script is named count_queued.py . The name of the HTML file that was downloaded should be provided on the command line. E.g.:
$ ./count_queued.py ~/Documents/Work/queued/Request.html Request Status Pending Approval: 69 Modified: 36 Pending Removal 43 On Hold: 0 Clarification Required: 28 Waiting Implementation: 26 Waiting Removal: 12 Total requiring review: 176 $
[ More Info ]