Skip to content

Instantly share code, notes, and snippets.

@Digital-Grinnell
Last active April 20, 2021 16:51
Show Gist options
  • Save Digital-Grinnell/fb9774c807ac4f9005edec9ca2869e9e to your computer and use it in GitHub Desktop.
Save Digital-Grinnell/fb9774c807ac4f9005edec9ca2869e9e to your computer and use it in GitHub Desktop.
Digital-Grinnell-Profile-MADS-Twig Rev 1
{# Digital_Grinnell_Profiles_MADS.twig Revision 1
THE official copy of this Twig template can be found as a Gist at
https://gist.github.com/Digital-Grinnell/436cd922a5c855635b931d05cf8a242a
This TWIG template for IMI import is intended to serve as a general-purpose
starting point for MADS Profile import into Digital Grinnell.
History --------------------
Rev 1
Creating from scratch. Very simple template strictly for use with data supplied by Liz on 2021-04-20.
#}
{% block content %}
{% autoescape false %}
<?xml version="1.0" encoding="UTF-8"?>
<mads xmlns="http://www.loc.gov/mads/v2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mads="http://www.loc.gov/mads/v2">
<authority>
<name>
<namePart type="given">{{ data.given_name }}</namePart>
<namePart type="family">{{ data.family_name }}</namePart>
</name>
<titleInfo>
<title>{{ data.display_name }}</title>
</titleInfo>
</authority>
{#
<variant>
<name>
<namePart type="given">Elizabeth</namePart>
<namePart type="family">DeLisle</namePart>
</name>
</variant>
<variant>
<name>
<namePart type="given">Liz</namePart>
<namePart type="family">DeLisle Rodrigues</namePart>
</name>
</variant>
#}
<affiliation>
<organization>{{ data.department }}</organization>
<email>{{ data.email }}</email>
</affiliation>
{#
<fieldOfActivity>Life Writing Studies</fieldOfActivity>
<fieldOfActivity>Digital Humanities</fieldOfActivity>
#}
<identifier type="u1">{{ data.identifier }}</identifier>
{#
<note type="history">
{{ data.biography }}
</note>
#}
<url>
{{ data.url }}
</url>
{% if data.orcid %}
<note type="orcid">
{{ data.orcid }}
</note>
{% endif %}
</mads>
{% endautoescape %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment