-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add help #14
Add help #14
Conversation
hocr-check: exit 0 if -h / --help
hocr-combine: exit 0 if -h / --help, #13
print "usage:",sys.argv[0],"[-o] file.html" | ||
|
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.
Usage: ...
It's common practice to start help text with upper case, so I suggest to change it here to upper case, too.
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.
I tried to stay as true to the current source as possible, not changing the output or coding style. But yes, it would be good to improve it once we have a baseline (all scripts printing help information, all scripts free off PyXML and unit tests running).
print_usage() | ||
sys.exit(0) | ||
|
||
if len(sys.argv)<2 or sys.argv[1] == '-h' or sys.argv[1] == '--help': |
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.
The second part after the first or
is not needed, because that is already dealt above. It should be enough to write
if len(sys.argv)<2:
I solved the conflict, adjusted the condition mentioned above and merged. @kba Thank you for your work! We can continue on some coding styles, after we have some unit tests and all the scripts are running again. |
This adds '-h'/'--help' to the commands listed in #13