ocrd.resource_manager module¶
- class ocrd.resource_manager.OcrdResourceManager(userdir=None, xdg_config_home=None, xdg_data_home=None, skip_init=False)[source]¶
Bases:
objectManaging processor resources
- property userdir¶
- property xdg_data_home¶
- property xdg_config_home¶
- list_available(executable: str = None, dynamic: bool = True, name: str = None, database: Dict = None, url: str = None)[source]¶
List models available for download by processor
- list_installed(executable: str = 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¶
- copy_resource(log: Logger, url: str, fpath: Path, resource_type: str = 'file', path_in_archive: str = '.') Path[source]¶
Copy a local resource to another destination