ocrd.resource_manager module

class ocrd.resource_manager.OcrdResourceManager(userdir=None, xdg_config_home=None, xdg_data_home=None, skip_init=False)[source]

Bases: object

Managing processor resources

property userdir
property xdg_data_home
property xdg_config_home
save_user_list(database=None)[source]
load_resource_list(list_filename, database=None)[source]
list_available(executable=None, dynamic=True, name=None, database=None, url=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, resource_type='file')[source]

Add a stub entry to the user resource.yml

property default_resource_dir
location_to_resource_dir(location)[source]
resource_dir_to_location(resource_path)[source]
static 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)[source]

Download a resource by URL