-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silence aux tools #493
Silence aux tools #493
Conversation
This is a breaking change and will require `endOfNight.sh` to be updated to use the new argument format. On the upside, the help screen is prettier, main() is simpler, and it allows me to do things like `./keogram -d /tmp/20210919/ -e jpg -o /tmp/k.jpg --font-color '#00ff00' --font-name triplex` and not be spammed by tons of logs. Of course, if you like that sort of thing, you are welcome to add `-v` or `--verbose`.
This is a breaking change and will require `endOfNight.sh` to be updated to use the new argument format. On the upside, the help screen is prettier, main() is simpler, and it allows me to do things like `./startrails -b 0.3 -d /tmp/20210919/ -e jpg -o /tmp/s.jpg` and not be spammed by tons of logs. Of course, if you like that sort of thing, you are welcome to add `-v` or `--verbose`. New feature: summary mode. Just scan the directory without rendering an image: `./startrails -s -d /tmp/20210919 -e jpg`
…ails Since keogram and startrails no longer gratuitously emit a log line per file processed, it is no longer necessary to create additional log files. Grrrr, vscode fixed all the tabs 'n' spaces.
Chris, in keogram.cpp, shouldn't this line: I thought one reason for keogram to display all the lines was to aid in debugging, if keogram stopped part way through the user could look at the log file (that's now removed in endOfNight.sh) to see where it stopped. Is that no longer needed? Ditto for startrails. And didn't its output lines include a brightness level to aid the user in debugging problems? When giving usage examples, I've been changing "ex:" in the scripts to "example:" to help users where english isn't their native language. |
Wait'll you see what else I've got in the pipeline. 🧑💻 Anyway, I'm going with "it's probably no longer needed to emit verbose messages by default." I was reprocessing a bunch of startrails and keograms today, and found a few reasons why OpenCV would crash; the logs weren't particularly helpful. In fact, I just looked for the directories with missing keograms or startrails, then ran the program under GDB to find and fix the line of code that triggered the offending assertion. Previously you might want to know what file caused the failure so that you could delete it ... now you don't have to delete it, the programs just skip it and continue. As for the summary statistics that used to emit - it still does that by default. I never found any value in the file-by-file brightness; the summary statistics were very helpful though, in picking some good settings, and those statistics aren't lost in all the rest of the spew. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
This set of commits switches command line argument parsing to use
getopt(3)
.Arguments such as directory, image extension, and output are now handled using command line flags (guess what
-d
,-e
, and-o
do), which makes them position insensitive.I've added some helpful sensible defaults, eg. if you ask to use a nonexistent font for keograms, you get a warning about that, and the program proceeds to use the
SIMPLEX
font. Keogram font color is now specified as a single hex value string, like colors in HTML, leading#
is optional, so you can say something like-C ff0000
or--font-color '#ff0000'
, whatever you prefer. These don't appear to be used inendOfNight.sh
A help screen is also available with
-h
or--help
. If argument errors are detected, the utility exits with error code 3 (as before), but if the help screen was requested then it exit with error code 0. It is not an error, after all, to ask the program how to correctly invoke it.From there, I added a
-v
flag which is used to enable/suppress extra verbose output, such as that emitted for every file read by keogram or startrails. The default is not verbose.Finally,
endOfNight.sh
was updated to take advantage of these new command line flags. Apologies for vscode being overly enthusiastic about normalizing all the spaces and tabs.