""" if self.has_non_empty_attribute("nombre"): return utils.q_from_first_wikilink("es", self.nombre) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_heritage() self.set_country() self.set_adm_location() self.set_directions() self.set_heritage_id() self.set_is() self.set_commonscat() self.set_coords() self.set_image("imagen") self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("pa", "es", PaEs) dataset.data_files = {"provinces": "panama_provinces.json"} importer.main(args, dataset)
def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_heritage() self.set_country() self.set_adm_location() self.set_directions() self.set_heritage_id() self.set_is() self.set_parts() self.set_commonscat() self.set_coords() self.set_image("imagen") self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("cl", "es", ClEs) dataset.data_files = { "municipalities": "chile_municipalities.json", "regions": "chile_regions.json" } importer.main(args, dataset)
self.add_description("en", english) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_commonscat() self.set_image() self.set_coords() self.set_country() self.set_heritage() self.set_heritage_id() self.set_admin_location() self.set_location() self.set_street_address() self.set_is() self.update_descriptions() self.update_labels() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("tn", "fr", TnFr) dataset.data_files = {"admin": "tunisia_admin.json", "settlements": "tunisia_settlements.json"} importer.main(args, dataset)
def make_dataset(country, language): """ Construct a dataset instance for the provided country and language codes. Only kept for backwards-compatibility with older monument classes. """ from Monument import Dataset from CzCs import CzCs from AtDe import AtDe from DkBygningDa import DkBygningDa from DkFortidsDa import DkFortidsDa from EeEt import EeEt from HuHu import HuHu from IeEn import IeEn from NoNo import NoNo from PlPl import PlPl from PtPt import PtPt from SeArbetslSv import SeArbetslSv from SeBbrSv import SeBbrSv from SeShipSv import SeShipSv from ZaEn import ZaEn SPECIFIC_TABLES = { "monuments_se-ship_(sv)": { "class": SeShipSv, "data_files": { "functions": "se-ship_(sv)_functions.json" } }, "monuments_cz_(cs)": { "class": CzCs, "data_files": {} }, "monuments_hu_(hu)": { "class": HuHu, "data_files": {} }, "monuments_pt_(pt)": { "class": PtPt, "data_files": {} }, "monuments_ie_(en)": { "class": IeEn, "data_files": { "counties": "ireland_counties.json" } }, "monuments_za_(en)": { "class": ZaEn, "data_files": {} }, "monuments_at_(de)": { "class": AtDe, "data_files": { "municipalities": "austria_municipalities.json" }, "lookup_downloads": { "types": "at_(de)/types" } }, "monuments_dk-bygninger_(da)": { "class": DkBygningDa, "data_files": {}, "subclass_downloads": { "settlement": "Q486972" } }, "monuments_pl_(pl)": { "class": PlPl, "data_files": { "settlements": "poland_settlements.json" } }, "monuments_dk-fortidsminder_(da)": { "class": DkFortidsDa, "data_files": { "types": "dk-fortidsminder_(da)_types.json", "municipalities": "denmark_municipalities.json" } }, "monuments_no_(no)": { "class": NoNo, "data_files": {} }, "monuments_se-bbr_(sv)": { "class": SeBbrSv, "data_files": { "functions": "se-bbr_(sv)_functions.json", "settlements": "sweden_settlements.json" } }, "monuments_ee_(et)": { "class": EeEt, "data_files": { "counties": "estonia_counties.json" } }, "monuments_se-arbetsl_(sv)": { "class": SeArbetslSv, "data_files": { "municipalities": "sweden_municipalities.json", "types": "se-arbetsl_(sv)_types.json", "settlements": "sweden_settlements.json" } } } specific_table_name = utils.get_specific_table_name(country, language) specific_table = None if specific_table_name in SPECIFIC_TABLES: specific_table = SPECIFIC_TABLES[specific_table_name] else: print("No class defined for {0}.".format(specific_table_name)) exit() dataset = Dataset(country, language, specific_table["class"]) dataset.data_files = specific_table.get("data_files") dataset.lookup_downloads = specific_table.get("lookup_downloads") dataset.subclass_downloads = specific_table.get("subclass_downloads") return dataset
Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_country() self.set_adm_location() self.set_location() self.set_is() self.set_special_is() self.set_image() self.set_inception() self.set_commonscat() self.set_coords() self.set_heritage() self.set_heritage_id() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("gh", "en", GhEn) dataset.data_files = { "regions": "ghana_regions.json" # http://tinyurl.com/y9ye4kfg } dataset.lookup_downloads = {"is": "gh_(en)/original function"} importer.main(args, dataset)
Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_coords() self.set_is() self.set_country() self.set_coords() self.set_heritage() self.set_heritage_id() self.set_adm_location() self.set_directions() self.set_image() self.set_commonscat() self.update_descriptions() self.update_labels() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("sv", "es", SvEs) dataset.lookup_downloads = {"heritage_type": "sv_(es)/tipo"} dataset.data_files = { "departments": "salvador_departments.json", "municipalities": "salvador_municipalities.json" } importer.main(args, dataset)
placename = utils.remove_markup(self.miejscowosc) try: location = [x["item"] for x in settlements_dict if x[ "pl"].strip() == placename][0] self.add_statement("location", location) except IndexError: return def __init__(self, db_row_dict, mapping, data_files, existing): Monument.__init__(self, db_row_dict, mapping, data_files, existing) self.update_labels() # self.exists("pl") self.set_commonscat() self.set_image("zdjecie") self.set_coords(("lat", "lon")) self.set_adm_location() self.set_no() self.set_location() self.set_address() self.exists_with_prop(mapping) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("pl", "pl", PlPl) dataset.data_files = { "settlements": "poland_settlements.json" } importer.main(args, dataset)
def exists_with_monument_article(self, language): return super().exists_with_monument_article("de", "artikel") def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("inventarnummer") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_country() self.set_heritage_id() self.set_image("foto") self.set_commonscat() self.set_coords() self.set_is() self.set_heritage() self.update_labels() self.update_descriptions() self.set_adm_location() self.set_street_address() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("mt", "de", MtDe) dataset.data_files = {"councils": "malta_councils.json"} importer.main(args, dataset)
try: county_name = "County " + self.county county_item = [ x["item"] for x in counties if x["en"] == county_name ] ref = self.create_wlm_source() self.add_statement("located_adm", county_item[0], refs=[ref]) except IndexError: return def __init__(self, db_row_dict, mapping, data_files, existing): Monument.__init__(self, db_row_dict, mapping, data_files, existing) self.update_labels() # self.exists("en") self.set_commonscat() self.set_image("image") self.set_coords(("lat", "lon")) self.set_adm_location() # self.set_no() # self.set_location() # self.exists_with_prop(mapping) self.print_wd() if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ie", "en", IeEn) dataset.data_files = {"counties": "ireland_counties.json"} importer.main(args, dataset)
self.add_statement("wlm_id", wlm) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("objectnr") self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_country() self.set_coords() self.set_location() self.set_adm_location() self.set_address() self.set_is() self.set_image() self.set_commonscat() self.set_inception() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("nl-aw", "nl", NlAwNl) dataset.data_files = {"settlements": "aruba_settlements.json"} importer.main(args, dataset)
repository) self.set_monuments_all_id("id") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_country() self.set_adm_location() self.set_directions() self.set_location() self.set_is() self.set_inception() self.set_heritage() self.set_coords() self.set_image() self.set_heritage_id() self.update_labels() self.update_descriptions() self.set_wd_item_via_name() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("uy", "es", UyEs) dataset.data_files = { "departments": "uruguay_departments.json", "settlements": "uruguay_settlements.json" } importer.main(args, dataset)
Monument.__init__(self, db_row_dict, mapping, data_files, existing) self.set_monuments_all_id() self.set_changed() self.wlm_source = self.create_wlm_source(self.monuments_all_id) self.set_country() self.set_is() self.set_heritage() self.set_source() self.set_registrant_url() self.set_labels("sv", self.namn) self.set_descriptions() self.set_image("bild") self.exists("sv", "artikel") self.set_type() self.set_commonscat() self.set_call_sign() self.set_manufacture_year() self.set_shipyard() self.set_homeport() self.set_dimensions() self.exists_with_prop(mapping) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("se-ship", "sv", SeShipSv) dataset.data_files = { "functions": "se-ship_(sv)_functions.json"} importer.main(args, dataset)
Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("idno") self.set_changed() self.set_wlm_source() self.set_country() self.set_heritage_id() self.set_heritage() self.set_is() self.set_special_is() self.set_adm_location() self.set_location() self.set_coords() self.set_image() self.update_descriptions() self.update_labels() # there's no commonscat in dataset self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("al", "sq", AlSq) dataset.data_files = { "settlements": "albania_settlements.json", "municipalities": "albania_municipalities.json" } dataset.lookup_downloads = {"is": "al_(sq)/type"} importer.main(args, dataset)
try: possible_socken = [ x["item"] for x in socken_dict if x["itemLabel"].startswith(self.socken) ] if len(possible_socken) != 1: raise ValueError self.add_statement("location", possible_socken[0]) except (IndexError, ValueError): raw_socken = "{} ({})".format(self.socken, self.landskap) self.add_to_report("socken", raw_socken) def set_monuments_all_id(self): """Map which column name in specific table to ID in monuments_all.""" self.monuments_all_id = self.id def exists_with_monument_article(self, language): return super().exists_with_monument_article("sv", "artikel") if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("se-fornmin", "sv", SeFornminSv) dataset.data_files = { "municipalities": "sweden_municipalities.json", "socken": "sweden_socken.json" } dataset.lookup_downloads = {"types": "se-fornmin_(sv)/types"} importer.main(args, dataset)
language=language) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_heritage() self.set_heritage_id() self.set_country() self.set_registrant_url() self.set_is() self.set_adm_location() self.set_directions() self.set_image("imagen") self.set_commonscat("monumento_categoria") self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("co", "es", CoEs) dataset.data_files = { "departments": "colombia_departments.json", } importer.main(args, dataset)
def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_adm_location() self.set_directions() self.set_location() self.set_is() self.set_country() self.set_image() self.set_heritage() self.set_heritage_id() self.set_coords(("lat", "lon")) self.set_commonscat() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ve", "es", VeEs) dataset.data_files = { "states": "venezuela_states.json", "settlements": "venezuela_settlements.json" } importer.main(args, dataset)
self.set_source() self.set_registrant_url() self.set_heritage_id() self.set_heritage() self.set_country() self.set_image() self.set_adm_location() self.set_commonscat() self.set_architect() self.set_style() # self.set_is() self.set_special_is() self.set_coords() self.set_building_year() self.set_address_and_disambig() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("be-bru", "nl", BeBruNl) dataset.data_files = {"municipalities": "belgium_municipalities.json"} dataset.lookup_downloads = { "type": "be-bru (nl)/objtype", "style": "be-bru (nl)/bouwstijl" } importer.main(args, dataset)
def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_country() self.set_adm_location() self.set_image() self.set_coords() self.set_commonscat() self.set_is() self.set_directions() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("am", "hy", AmHy) dataset.data_files = { "communities": "armenia_communities.json", "provinces": "armenia_provinces.json"} importer.main(args, dataset)
repository) self.set_monuments_all_id("id") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_country() self.set_location() self.set_adm_location() self.set_address() self.set_is() self.set_heritage() self.set_heritage_id() self.update_labels() self.update_descriptions() self.set_coords() self.set_image() self.set_commonscat() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("rs", "sr", RsSr) dataset.data_files = { "admin": "serbia_admin.json", "okruzi": "serbia_okruzi.json", "settlements": "serbia_settlements.json" } importer.main(args, dataset)
self.NATIONAL_IMPORTANCE_STR = "ეროვნული" self.NATIONAL_IMPORTANCE_Q = "Q34480057" self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_country() self.set_coords() self.set_adm_location() self.set_address() self.set_is() self.set_image() self.set_commonscat() self.set_inception() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ge", "ka", GeKa) dataset.data_files = { "admin": "georgia_admin.json", "settlements": "georgia_settlements.json" } dataset.lookup_downloads = {"types": "ge (ka)/types"} importer.main(args, dataset)
return super().exists_with_monument_article("de", "artikel") def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id() self.set_changed() self.wlm_source = self.create_wlm_source(self.monuments_all_id) self.update_labels() self.set_descriptions() self.set_is() self.set_type() self.set_country() self.set_image("foto") self.set_heritage() self.set_heritage_id() self.set_adm_location() self.set_street_address() self.set_coords(("lat", "lon")) self.set_commonscat() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("at", "de", AtDe) dataset.data_files = {"municipalities": "austria_municipalities.json"} dataset.lookup_downloads = {"types": "at_(de)/types"} importer.main(args, dataset)
Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_adm_location() self.set_country() self.set_location() self.set_heritage() self.set_heritage_id() self.set_coords() self.set_is() self.set_commonscat() self.set_directions() self.set_image() self.update_descriptions() self.update_labels() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("pe", "es", PeEs) dataset.data_files = { "municipalities": "peru_provinces.json", "regions": "peru_regions.json" } importer.main(args, dataset)
self.arbetsam_source = self.create_stated_in_source( "Q28834837", "2013-11-28") self.set_id() self.set_country() self.set_source() self.set_registrant_url() self.set_is() self.set_labels("sv", self.namn) self.set_descriptions() self.set_type() self.set_adm_location() self.set_location() self.set_street_address("sv", "adress") self.set_image("bild") self.set_commonscat() self.set_coords(("lat", "lon")) self.set_wd_item(self.find_matching_wikidata(mapping)) # self.print_wd() if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("se-arbetsl", "sv", SeArbetslSv) dataset.data_files = { "municipalities": "sweden_municipalities.json", "types": "se-arbetsl_(sv)_types.json", "settlements": "sweden_settlements.json" } importer.main(args, dataset)
def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_country() self.set_coords() self.set_adm_location() self.set_location() self.set_directions() self.set_is() self.set_image() self.set_commonscat() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ir", "fa", IrFa) dataset.data_files = { "provinces": "iran_provinces.json", # http://tinyurl.com/yd9xed2s "cities": "iran_cities.json" # http://tinyurl.com/ybslxkm9 } importer.main(args, dataset)
Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id() self.set_changed() self.wlm_source = self.create_wlm_source(self.monuments_all_id) self.set_heritage() self.set_country() self.set_source() self.set_registrant_url() self.set_is() self.update_labels() self.update_descriptions() self.set_commonscat() self.set_image("billede") self.set_coords(("lat", "lon")) self.set_adm_location() self.set_type() self.set_id() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("dk-fortidsminder", "da", DkFortidsDa) dataset.data_files = { "types": "dk-fortidsminder_(da)_types.json", "municipalities": "denmark_municipalities.json" } importer.main(args, dataset)
wml_code = self.mapping["table_name"].upper() self.add_statement("wlm_id", "{}-{}".format(wml_code, str(self.id))) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("id") self.set_registrant_url() self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_country() self.set_adm_location() self.set_location() self.set_heritage() self.set_commonscat() self.set_image() self.set_coords() self.set_is() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("cm", "fr", CmFr) dataset.data_files = {"regions": "cameroon_regions.json"} importer.main(args, dataset)
repository) self.set_changed() self.set_monuments_all_id("number") self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_coords() self.set_commonscat() self.set_image("pilt") self.set_country() self.set_adm_location() self.update_heritage() self.set_is() self.set_location() self.set_labels("et", self.nimi) self.set_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ee", "et", EeEt) dataset.data_files = { "municipalities": "estonia_municipalities.json", "settlements": "estonia_settlements.json", "counties": "estonia_counties.json" } dataset.lookup_downloads = {"heritage_types": "ee (et)/types"} importer.main(args, dataset)
self.set_country() self.set_is() self.set_heritage() self.set_source() self.set_registrant_url() self.update_labels() self.update_descriptions() self.set_image("bild") self.set_commonscat() self.set_coords(("lat", "lon")) self.set_inception() self.set_no_of_buildings() self.set_heritage_bbr() self.set_adm_location() self.set_architect() self.set_location() self.set_function() self.set_wd_item(self.find_matching_wikidata(mapping)) self.check_wd_item() if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("se-bbr", "sv", SeBbrSv) dataset.data_files = { "functions": "se-bbr_(sv)_functions.json", "settlements": "sweden_settlements.json" } importer.main(args, dataset)
def update_labels(self): romanian = utils.remove_markup(self.denumire) self.add_label("ro", romanian) def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("cod") self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_heritage() self.set_country() self.set_adm_location() self.set_address() self.set_location() self.set_coords() self.set_commonscat() self.set_image("imagine") self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Command line entry point for importer.""" args = importer.handle_args() dataset = Dataset("ro", "ro", RoRo) dataset.data_files = {"counties": "romania_counties.json"} importer.main(args, dataset)
def __init__(self, db_row_dict, mapping, data_files, existing, repository): Monument.__init__(self, db_row_dict, mapping, data_files, existing, repository) self.set_monuments_all_id("idno") self.set_changed() self.set_wlm_source() self.set_heritage_id() self.set_coords() self.set_country() self.set_adm_location() self.set_location() self.set_is() self.set_heritage() self.set_inception() self.update_labels() self.update_descriptions() self.set_wd_item(self.find_matching_wikidata(mapping)) if __name__ == "__main__": """Point of entrance for importer.""" args = importer.handle_args() dataset = Dataset("xk", "sq", XkSq) dataset.data_files = {"settlements": "kosovo_settlements.json"} dataset.lookup_downloads = { "municipalities": "xk (sq)/municipalities", "categories": "xk (sq)/category" } importer.main(args, dataset)