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 resource schema and resource_locations to ocrd-tool.json schema #181

Merged
merged 6 commits into from
Feb 14, 2022

Conversation

kba
Copy link
Member

@kba kba commented Mar 17, 2021

Adds two new properties to the tools list items in ocrd-tool.json:

  • resources: List resources that can be used with this processor, to be used with OCR-D/core's ocrd resmgr CLI and resource lookup mechanism
  • resource_locations: By default, resource's are looked up in data ($XDG_DATA_HOME), cwd and system (/usr/local/share/ocrd-resources). Since not all processors can support the full range of locations (notably ocrd_tesserocr can look only in one location for models), this allows restricting the locations to look for this processor.

Until now, we're maintaining a central resource registry in OCR-D/core. We want to decentralize this, allowing processor developers to list resources in their own ocrd-tool.json.

@bertsky
Copy link
Collaborator

bertsky commented Jan 28, 2022

Should probably be addressed here, too:

ocrd_tool.schema.yml Outdated Show resolved Hide resolved
@bertsky
Copy link
Collaborator

bertsky commented Feb 2, 2022

  • resources that reside in the distribution directory of the module and come pre-installed (think Python site-packages).

there should be no need to register these, though

Copy link
Collaborator

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the ocrd_tool.md needs to be updated as well:

  • mention the resources and resource_locations under the File parameters section
  • show them in the examples

ocrd_tool.schema.yml Outdated Show resolved Hide resolved
bertsky and others added 5 commits February 4, 2022 12:24
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
@kba kba merged commit 544e2e3 into master Feb 14, 2022
@kba kba deleted the resources-ocrd-tool branch March 1, 2022 13:42
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.

2 participants