WSL/SLF GitLab Repository

Commit e308d0d6 authored by Rebecca Kurup Buchholz's avatar Rebecca Kurup Buchholz
Browse files

Tested calling package_list

parent 9187f2d3
Pipeline #525 passed with stages
in 2 minutes and 15 seconds
import json
# Converter valid only for metadata schema of EnviDat
def envidat_to_opendataswiss_converter(metadata_record):
"""
Converts JSON data to XML fil
:param metadata_record: JSON data from EnviDat metadata record from
https://www.envidat.ch/api/action/current_package_list_with_resources
:return: XML file in OpenDataSwiss format like this https://www.envidat.ch/opendata/export/dcat-ap-ch.xml
"""
# TODO try using call to resource_show
with open(metadata_record) as json_format_file:
# data = json.load(json_format_file)
# print(data)
pass
# ========================================== TESTING ===========================================================
envidat_to_opendataswiss_converter("test_record.json")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment