Skip to content

Commit

Permalink
Merge pull request #407 from IATI/updates/org-id/2024-02-28
Browse files Browse the repository at this point in the history
 Sync OrganisationRegistrationAgency with upstream org-id.guide
  • Loading branch information
Bjwebb authored Mar 20, 2024
2 parents 14148a7 + de8ca7b commit d25ea67
Show file tree
Hide file tree
Showing 3 changed files with 6,745 additions and 1,415 deletions.
8 changes: 6 additions & 2 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
org_id_xml = etree.parse(join('source', 'org-id-guide.xml'))
codelist_items = org_id_xml.find('codelist-items')

parser = etree.XMLParser(strip_cdata=False)
template = etree.parse(
join('templates', 'OrganisationRegistrationAgency.xml'))
join('templates', 'OrganisationRegistrationAgency.xml'),
parser=parser)
placeholder_codelist_items = template.find('codelist-items')

template.getroot().replace(placeholder_codelist_items, codelist_items)

etree.indent(template, space=' ')

template.write(
join('xml', 'OrganisationRegistrationAgency.xml'),
pretty_print=True)
encoding='utf-8')
5 changes: 4 additions & 1 deletion templates/OrganisationRegistrationAgency.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<codelist name="OrganisationRegistrationAgency" complete="0" xml:lang="en" category-codelist="Country">
<codelist name="OrganisationRegistrationAgency" complete="0" xml:lang="en" category-codelist="Country" embedded="0">
<metadata>
<name>
<narrative>Organisation Registration Agency</narrative>
Expand All @@ -14,6 +14,9 @@
If org-id.guide does not contain an entry for the kind of organisation you need to identify, you can make a request a new list is included in the register following the `guidance <http://docs.org-id.guide/en/latest/contribute/>`__ or by getting in touch with org-id.guide at: [email protected].
]]></narrative>
</description>
<category>
<narrative>Replicated</narrative>
</category>
</metadata>
<codelist-items/>
</codelist>
Loading

0 comments on commit d25ea67

Please sign in to comment.