ocrd.resource_manager module

class ocrd.resource_manager.OcrdResourceManager[source]

Bases: object

Managing processor resources

load_resource_list(list_filename, database=None)[source]
list_available(executable=None)[source]

List models available for download by processor

list_installed(executable=None)[source]

List installed resources, matching with registry by name

add_to_user_database(executable, res_filename, url=None)[source]

Add a stub entry to the user resource.yml

find_resources(executable=None, name=None, url=None, database=None)[source]

Find resources in the registry

property default_resource_dir
location_to_resource_dir(location)[source]
resource_dir_to_location(resource_path)[source]
parameter_usage(name, usage='as-is')[source]
download(executable, url, basedir, overwrite=False, no_subdir=False, name=None, resource_type='file', path_in_archive='.', progress_cb=None, size=None)[source]

Download a resource by URL