diff --git a/CHANGELOG.md b/CHANGELOG.md index f1241d40fab63e49e840db8c0cdd380916ad0afe..0572dda73cb0096081fb019c41a20b486ef07865 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,8 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The ``prefix`` argument of `crawler_main` is deprecated. Use the new argument ``remove_prefix`` instead. -- The functions ``load_definition`` and ``load_converters`` are deprecated. Please use - the functions ``load_definition`` and ``create_converter_registry`` from the scanner module +- The functions ``load_definition``, ``initialize_converters`` and ``load_converters`` are deprecated. Please use + the functions ``load_definition``, ``initialize_converters`` and ``create_converter_registry`` from the scanner module instead. ### Removed ### diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index da54104bcab8e91aff684b4eafc8bfee891a8ffa..3dd1001172cfbebbd82bd50af8a4490fdcb0d3b7 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -67,7 +67,10 @@ from .stores import GeneralStore, RecordStore from .structure_elements import StructureElement, Directory, NoneElement from .version import check_cfood_version -from .scanner import scan_directory, load_definition, create_converter_registry +from .scanner import (scan_directory, + load_definition, + create_converter_registry, + initialize_converters) from .debug_tree import DebugTree logger = logging.getLogger(__name__) @@ -229,9 +232,14 @@ class Crawler(object): 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.")) + "Please use load_definition from the scanner module.")) return load_definition(crawler_definition_path) + def initialize_converters(self, crawler_definition: dict, converter_registry: dict): + warnings.warn(DeprecationWarning( + "The function initialize_converters in the crawl module is deprecated. " + "Please use initialize_converters from the scanner module.")) + return initialize_converters(crawler_definition, converter_registry) def generate_run_id(self): self.run_id = uuid.uuid1()