Closed AndyElliottCRL closed 2 years ago
There are two questions here: what to do and how to do it. The what is hard, so a note on the how. The options seem to be:
termcolor
is the most frequently suggested. It seems stable, is well documented, and worked in my tests, but it also hasn't been updated in a decade. I think colorama
is mainly for Windows. sty
says it works on *nix and recent Windows Terminal installs. I'm not going to roll my own.
All of this is to say it looks like we'll be using termcolor
.
Also putting this as low priority. I think we need to either commit to a GUI or commit to a fuller command line version. So I'm not going to throw a lot of effort at either a GUI or a prettier command line until we make a decision one way or another.
I did a test of this for the file location command line outputs from issue #26 . It uses termcolor
, and then also imports colorama
to suppress ANSI codes that pop up on the basic Windows command line and a couple of other places. Here's the output on cmd.exe under Windows 10:
Not amazing, but fine.
I'm going to keep a list of environments where the color output works and where it doesn't work in the next two comments.
Command line colors tested and working on:
Windows 10:
cmd.exe
)Command line colors tested and not working on:
I changed the blue to cyan and put the red on a white background to make the output readable on Powershell. That will be enough for now. Here it is on cmd.exe:
Most of the terminal interface has some colorizing to it. Still need to colorize the output of the quick scan and the output of the main run itself.
The current main menu (in VS Code's built in terminal under Linux):
Everything has at least preliminary coloring. I'll update as needed, but it should be good for now.
Specifics TBA but even before a GUI is ready we should be able to make the command line interface more user friendly by using colors and highlighting. Adding now as placeholder/don't forget for future.