-
Notifications
You must be signed in to change notification settings - Fork 32
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
implement value range with .. operator for pageId #672
Conversation
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.
Very nice!
(Although I would personally find it more intuitive if 01..05 included 05. Most users will probably not be programmers. And even if they are, they might expect semantics as in shell brace expansion.)
That was my intention ("Generate a list of strings by incrementing the number part of |
Should we also support this for |
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
==========================================
+ Coverage 78.73% 78.82% +0.08%
==========================================
Files 55 55
Lines 3443 3457 +14
Branches 698 702 +4
==========================================
+ Hits 2711 2725 +14
Misses 592 592
Partials 140 140
Continue to review full report at Codecov.
|
Not so sure. That's not part of the processor API, and you can still use the regex syntax... BTW, the pageId range expression must go to the spec, too. |
When processing works with a non-trivial amount of pages, or when a long process fails in the middle of a run, it would be useful to not only allow comma-separated page ID values but ranges of page IDs.
This PR implements this by introducing the syntax
--page-id <startid>..<endid>
which<startid>
and<endid>
E.g. you can do
ocrd-processor -g PHYS_0001..PHYS_0003
is equivalent toocrd-processor -g PHYS_0001,PHYS_0002,PHYS_0003
but shorter.