--- a/documents/datagov-export.py +++ b/documents/datagov-export.py @@ -177,6 +177,12 @@ tags = [re.sub('[^a-zA-Z0-9-_.]', '', tag.replace('&', 'and')).lower() for tag in tags if tag] #print tags + extras = [] + + for extra_key in doc.value['metadata'].keys(): + if extra_key != "Keywords / Tags" and extra_key != "data.gov.au Category" and extra_key != "Download" : + extras.append({'key':extra_key, 'value':doc.value['metadata'][extra_key]}) + package_entity = { 'name': pkg_name, 'title': doc.value['metadata']['DCTERMS.Title'], @@ -186,8 +192,8 @@ 'maintainer': creator, 'licence_id': get_licence_id(doc.value['metadata']['DCTERMS.License']), 'notes': html2text.html2text(doc.value['metadata']['Description']), - 'owner_org': org_id - #todo add missing key values like jurasdiction + 'owner_org': org_id, + 'extras': extras }