Open kba opened 5 months ago
Most OCR-D processors return 1 when they are called without any argument, but
ocrd
from core is an exception which returns 0. Should that be changed?
I don't think so. Both behaviours are well documented. Processors adhere to the OCR-D CLI specification, and ocrd
(being a multi-task CLI and not part of the spec) just yields the --help
output, which is the most useful default.
@bertsky, thank you for pointing to the OCR-D CLI specification. Where is it documented that running ocrd
without an argument should return 0? If there is no such documentation, it should be changed to return 1 for consistency with OCR-D processors and common command line tools like cp
and others.
Where is it documented that running
ocrd
without an argument should return 0?
That's click's default (because traditionally that's how multi-task CLI behave).
If there is no such documentation, it should be changed to return 1 for consistency with OCR-D processors
I totally disagree.
First of all, this would break existing usage without even a reason.
Second, there is simply no need for "consistency" with OCR-D processors, as this is a different kind of CLI, as I have already pointed out.
That's click's default (because traditionally that's how multi-task CLI behave).
Please give more evidence for that statement. I just tried git
. Is that a multi-task CLI? How does it behave?
First of all, this would break existing usage without even a reason.
Do you have a real-life example of this?
Most OCR-D processors return 1 when they are called without any argument, but
ocrd
from core is an exception which returns 0. Should that be changed?_Originally posted by @stweil in https://github.com/OCR-D/ocrd_froc/issues/13#issuecomment-2053953307_