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

What to do if --mets is unspecified and no mets.xml is present #562

Closed
kba opened this issue Aug 12, 2020 · 1 comment · Fixed by #586
Closed

What to do if --mets is unspecified and no mets.xml is present #562

kba opened this issue Aug 12, 2020 · 1 comment · Fixed by #586
Assignees

Comments

@kba
Copy link
Member

kba commented Aug 12, 2020

Currently, a processor call, if --mets was not given and no mets.xml is present in $PWD, the --help message is given. The reasoning is that if a user calls a processor without any arguments, it makes more sense to provide general help instead of the very specific error message mets.xml could not be found.

However from feedback from @dla-kramski, @ElexaDigitalia_twitter and others, this behavior (in core since 2.12.0 #438 OCR-D/spec#156) is confusing because it is also triggered if -I and -O are provided.

So I propose to change the behavior to this:

  • If no options/arguments at all are provided to a processor, then print the --help
  • If METS cannot be found, raise an error saying so
@bertsky
Copy link
Collaborator

bertsky commented Aug 12, 2020

So I propose to change the behavior to this:

* If no options/arguments _at all_ are provided to a processor, then print the `--help`

* If METS cannot be found, raise an error saying so

Looks good. (But for things that might go wrong in scripts/makefiles, I'd also make the first case exit with non-zero besides showing the help text.)

@kba kba linked a pull request Sep 2, 2020 that will close this issue
@kba kba closed this as completed in #586 Sep 22, 2020
kba added a commit that referenced this issue Sep 22, 2020
show help for no-arg processor calls, fix #562, fix #274
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 a pull request may close this issue.

2 participants