{% macro fatcat_bits(entity, entity_type, expand="", editgroup=None) -%} {% if entity.state == None and editgroup.editgroup_id %}
Edit In Progress

You are viewing this entity as of a specific editgroup (which may or may not have been merged yet): {{ editgroup.editgroup_id }}

{% elif entity.state == None and entity.ident == None %}
Revision

You are viewing a specific revision of an entity.

{% elif entity.state == "wip" %}
Work In Progress

This entity has not been "accepted" into the official database yet.

{% endif %}
Fatcat Bits

State is "{{ entity.state }}". {% if entity.state != "deleted" %} Revision:
{{ entity.revision }} {% endif %}
As JSON object via API

Edit Metadata View History
{%- endmacro %} {% macro extra_metadata(extra) -%} {% for (key, value) in extra.items()|sort %} {% if key in ("ia", "crossref", "kbart", "arxiv", "jstor", "pubmed") and value is mapping and value %} {% for (inner_key, inner_value) in value.items()|sort %}
{{ key }}.{{ inner_key }} {{ inner_value }} {% endfor %} {% elif key in ("urls") and value and value is iterable and value is not string %}
{{ key }} {% for u in value %} {{ u }}
{% endfor %}
{% else %}
{{ key }} {{ value }} {% endif %} {% endfor %}
{%- endmacro %} {% macro release_list(releases) -%} {% for release in releases %}
{% if release.release_date %}{{ release.release_date }}{% elif release.release_year %}{{ release.release_year }}{% else %}unknown{% endif %} {{ release.title }}
{{ release.release_stage or "unknown status" }} | {{ release.release_type or "unknown type" }} {% if release.version %} | {{ release.version }}{% endif %} {% if release.license_slug %} | {{ release.license_slug }}{% endif %} {% if release.ext_ids.doi %}
doi:{{ release.ext_ids.doi }} {% endif %} {% endfor %}
{%- endmacro %} {% macro url_list(urls, wayback_suffix="") -%} {% for url in urls %} {% if url.rel == "wayback" %} {% set suffix = wayback_suffix %} {% else %} {% set suffix = "" %} {% endif %} {% set entity = release %}
{{ url.rel }} {% if url.url.count('/') >= 3 and url.rel != "dweb" %} {{ '/'.join(url.url.split('/')[0:2]) }}/{{ ''.join(url.url.split('/')[2]) }}/{{ '/'.join(url.url.split('/')[3:]) }}{{ suffix }} {% else %} {{ url.url }}{{ suffix }} {% endif %} {% endfor %}
{%- endmacro %} {% macro lookup_form(entity_type, key, example, lookup_key, lookup_value, lookup_error) -%} {%- endmacro %}