Skip to content
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

Merged
merged 6 commits into from
May 21, 2016
Merged

Add help #14

merged 6 commits into from
May 21, 2016

Conversation

kba
Copy link
Contributor

@kba kba commented May 19, 2016

This adds '-h'/'--help' to the commands listed in #13

print "usage:",sys.argv[0],"[-o] file.html"

Copy link
Collaborator

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.

Copy link
Contributor Author

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':
Copy link
Collaborator

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:

@zuphilip zuphilip merged commit a41918c into ocropus:master May 21, 2016
@zuphilip
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants