def __init__(self, package_name=None, path=None, extract_nations=False): self.package_name = package_name self.path = path self._dois = [] self.articles_normalized = [] self.logger = create_logger( "Springer", filename=join(CFG_LOGDIR, 'scoap3_harvesting.log') ) self.config = load_config(CFG_CONFIG_PATH, {'SPRINGER': []}) self.packages_delivery = [] self.doi_package_name_mapping = [] if not path and package_name: self.logger.info("Got package: %s" % (package_name,)) self.path = self._extract_packages() elif not path and not package_name: print "Starting harvest" self.run() self._crawl_springer_and_find_main_xml() self.extract_nations = extract_nations
def __init__(self, package_name=None, path=None, extract_nations=False): if package_name: if not package_name.endswith(".zip"): raise Exception('package_name variable requires a ZIP file.') self.package_name = package_name self.path = path self._dois = [] self.articles_normalized = [] self.logger = create_logger("Oxford", filename=join(CFG_LOGDIR, 'scoap3_harvesting.log')) self.config = load_config(CFG_CONFIG_PATH, {'OXFORD': []}) self.packages_delivery = [] self.doi_package_name_mapping = [] if not path and package_name: self.logger.info("Got package: %s" % (package_name, )) self.path = self._extract_packages() elif not path and not package_name: print("Starting harvest") self.run() self._crawl_oxford_and_find_main_xml() self.extract_nations = extract_nations
def __init__(self, package_name=None, path=None, extract_nations=False): if package_name: if not package_name.endswith(".zip"): raise Exception('package_name variable requires a ZIP file.') self.package_name = package_name self.path = path self._dois = [] self.articles_normalized = [] self.logger = create_logger( "Oxford", filename=join(CFG_LOGDIR, 'scoap3_harvesting.log') ) self.config = load_config(CFG_CONFIG_PATH, {'OXFORD': []}) self.packages_delivery = [] self.doi_package_name_mapping = [] if not path and package_name: self.logger.info("Got package: %s" % (package_name,)) self.path = self._extract_packages() elif not path and not package_name: print("Starting harvest") self.run() self._crawl_oxford_and_find_main_xml() self.extract_nations = extract_nations
def __init__(self, logger): self.ftp = None self.files_list = [] self.retrieved_packages = {} self.retrieved_packages_unpacked = [] self.path = None self.retrieved_packages_unpacked = [] self.found_articles = [] self.found_issues = [] self.path_r_pkg = [] self.logger = logger self.packages_delivery = [] self.config = load_config(CFG_CONFIG_PATH, {'ELSEVIER': []})
def __init__(self, logger): self.ftp = None self.files_list = [] self.retrieved_packages = {} self.retrieved_packages_unpacked = [] self.path = None self.retrieved_packages_unpacked = [] self.found_articles = [] self.found_issues = [] self.path_r_pkg = [] self.logger = logger self.packages_delivery = [] self.config = load_config(CFG_CONFIG_PATH, {'ELSEVIER': []})
def __init__(self, package_name=None, path=None, extract_nations=False): self.package_name = package_name self.path = path self._dois = [] self.articles_normalized = [] self.logger = create_logger("Springer", filename=join(CFG_LOGDIR, 'scoap3_harvesting.log')) self.config = load_config(CFG_CONFIG_PATH, {'SPRINGER': []}) self.packages_delivery = [] self.doi_package_name_mapping = [] if not path and package_name: self.logger.info("Got package: %s" % (package_name, )) self.path = self._extract_packages() elif not path and not package_name: print "Starting harvest" self.run() self._crawl_springer_and_find_main_xml() self.extract_nations = extract_nations