-
Notifications
You must be signed in to change notification settings - Fork 51
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
improvements for checkpars.py #53
Comments
Another option would check the description in the .SH NAME field of the man page, with the output of the "help=u" line. I would like to argue that they should be the same. For example for ccdfits they differ by one word :-) |
-h flag implemented |
minor request: in the output it says "man" and "help", which means the output in the two rows is mis-aligned. if we rename "help" to "bin", they will align and it still reflects where it came from. |
The output says |
I'm not sure if the merge from checkpars (about the chmod +x) worked. My example above was also wrong, i referred to install.sh, but it should have been checkpars.py. I repeated this experiment in my master branch, so your next edit should start from this. |
checkpars returns None when it either 1) fails to read the man file, or 2) fails to find a keyword in the line following a .TP, I can change it to print something else based on the case. I've changed the function to return None when it fails to read the man page and "Non-conformant" when it fails to read a keyword after a .TP line |
yes, it would be useful to print something different in the two cases. |
ccdppm.1 was flagged as non-conformant, but I think it may be because the last keyword is "8bit=" and there is a problem with scanning keyword names when a non-alpha character is in the name. I had several false negatives in that category. |
Changed help to bin
|
Also to fix: |
help=h now skips lines that start with spaces |
Added -f support plus lots of other stuff. |
Once we have a robust way where the -v option works, we could also have an option to check the usage line, e.g. with a new -u flag. Here's my thoughts on this. Each program has a one line description. E.g. "man tsf" shows The "tsf help=h" shows it slightly different: The $NEMO/src/scripts/tasklist also has an entry, because "mknemo" has a method to maintain this list. The mknemo script will update a temporary file in $NEMO/etc/tasklist, and once every while I will mere new/uniq entries in the master list in $NEMO/src/scripts/tasklist There's more behind this. This tasklist is also something in a wider circle , outside of NEMO, to allow a google type search one level deeper than the description of NEMO. |
I did find a .SH scanning error. Look at the report on scanfits. Various .TP items in the ".SH FIXES" portion of the man page seem to think they are keywords (ING, TUCSON, etc.) |
added -u flag |
To Do: |
Anymore improvements? |
can you check the man page (checkpars.8), overall if it's correct, and there is a statement that it can only be run from $NEMO. Also the EXAMPLE should have a line "cd $NEMO" before the "make" line. |
Good to close this issue? |
Now that we have a functional checkpars.py, we need a few enhancements: thanks @ParkerTewell for an excellent first version
script needs to made "chmod +x ", but via git: git update-index --chmod=+x install.sh
after this a regular commit push.
I see a few programs with the output "man: None". Does this mean the man page doesn't exist. But I see a None for ccdmom, and the man page exists. There are a few more like this. But other "None" are indeed for missing man pages.
Add a "-h" which reminds the user of the valid options, and then exit the program. Could also report a version, as most scripts and programs report that in the inline help option
we already spoke about a "-f tasklist" where tasklist needs to be a valid file (either absolute or relative path)
currently the script needs to be executed from src/scripts, but if the default tasklist is $NEMO/src/scripts/tasklist it can be from anywhere. use os.environ['NEMO'] to get $NEMO
The text was updated successfully, but these errors were encountered: