generate backlinks from person to project #9
2 changed files with 13 additions and 0 deletions
|
|
@ -36,9 +36,14 @@ jobs:
|
|||
# get_file_content: false
|
||||
|
||||
- name: Process metadata
|
||||
env: QRI_RECORD_CACHE=/tmp/cache-person-project
|
||||
run: |
|
||||
dtc get-records $DUMPTHINGS_APIURL public -C XYZProject \
|
||||
| qri inline-records -c public -p associated_with::roles \
|
||||
| qri cache > /dev/null
|
||||
dtc get-records ${DUMPTHINGS_APIURL} public -C XYZPerson \
|
||||
| qri filter-linked-pid public xyzrins:. associated_with \
|
||||
| qri inject-links-pid --only-from-cache -C XYZProject --link associated_with was_associated_with \
|
||||
| qri inline-records -c public -p delegated_by -p delegated_by::roles -p identifiers::creator \
|
||||
| qri render-record page_templates/person.md.j2 'content/{__pid_curie_reference}/_index.md'
|
||||
- name: Deposit changes
|
||||
|
|
|
|||
|
|
@ -13,4 +13,12 @@ title: {{ given_name }} {{ family_name }}
|
|||
{% elif identifier.creator.name == "ResearchGate" %}- [ResearchGate: {{ identifier.notation }}](https://www.researchgate.net/profile/{{ identifier.notation }})
|
||||
{% else %}- {{ identifier.creator.name }}: {{ identifier.notation }}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
This Person was associated with the following projects:
|
||||
|
||||
{%- for project in was_associated_with %}
|
||||
{% set associations = project.associated_with | selectattr("object", "eq", pid) | list %}
|
||||
- [{{ project.title }}](/{{ project.pid | replace("xyzrins:", "") }}) as {% for ass in associations %} {% for role in ass.roles %} {{ role.display_label | default(role.name) | lower() }}{{ ", " if not loop.last }} {% endfor %} {% if ass.started is defined and ass.ended is defined %} ({{ ass.started.at_time }} -- {{ ass.ended.at_time }}) {% elif ass.started %} (since {{ ass.started.at_time }}) {% elif ass.ended %} (until {{ ass.ended.at_time }}) {% endif %} {%- if not loop.last %};{% endif %} {% endfor %}
|
||||
{%- endfor -%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue