diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index eee0046c9d4f97b66a91d87ce0439b7e5af232f9..da54104bcab8e91aff684b4eafc8bfee891a8ffa 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -67,7 +67,7 @@ from .stores import GeneralStore, RecordStore from .structure_elements import StructureElement, Directory, NoneElement from .version import check_cfood_version -from .scanner import scan_directory +from .scanner import scan_directory, load_definition, create_converter_registry from .debug_tree import DebugTree logger = logging.getLogger(__name__) @@ -220,6 +220,19 @@ class Crawler(object): "The generalStore argument of the Crawler class is deprecated and has no effect.")) + def load_converters(self, definition: dict): + warnings.warn(DeprecationWarning( + "The function load_converters in the crawl module is deprecated. " + "Please use create_converter_registry from the scanner module.")) + return create_converter_registry(definition) + + def load_definition(self, crawler_definition_path: str): + warnings.warn(DeprecationWarning( + "The function load_definition in the crawl module is deprecated. " + "Please use the load_definition from the scanner module.")) + return load_definition(crawler_definition_path) + + def generate_run_id(self): self.run_id = uuid.uuid1()