If that prints the questions to standard out and and takes the answers from standard in, then porting it to a Windows command shell window should be the nearest thing to trivial. You could post that code and there are undoubtedly a lot of both Linux and Windows users who'd be very grateful. MacOS also, I should think, but I don't know.
The Q & A script is trivial as you note. Also the script was hacked together to the point that it just barely worked by a guy running on practically no sleep this week. So ultimately the only real meat worth sharing is the broken-out question set.
Unfortunately, the
TRA study guide is chock full of copyright notices, so I can't post those without spending more time seeking IP permissions than I feel like or have time for. Even that part isn't hard to recreate though, just a little tedious.
As usual when I try to reap organized text from any pdf not deliberately created to be easy to parse, none of the pdf or postscript parsers I tried could handle it, so I cut and pasted it all into four text files (tech Qs, tech As, safety Qs, and safety As) and cleaned them up. After that I was easily able to grep on patterns in the question and answer formats to break them out individually.