Obsidian/1000. Templates/Literature Note.md

2.3 KiB
Executable File

readstatus: false dateread: title: "{{ title }}" year: {{ date | format('YYYY') }} authors: {% for type, creators in creators | groupby('creatorType') %} {% for creator in creators %} - "{% if creator.name %}{{ creator.name }}{% else %}{{ creator.lastName }}, {{ creator.firstName }}{% endif %}" {% endfor %} {% endfor %} DOI: "{{ DOI }}" ISBN: "{{ ISBN }}" citekey: "{{ citekey }}" itemType: "{{ itemType }}" {% if itemType == "journalArticle" %} journal: "{{ publicationTitle }}" {% endif %} {% if volume %} volume: {{ volume }} {% endif %} {% if issue %} issue: {{ issue }} {% endif %} {% if itemType == "bookSection" %} book: "{{ publicationTitle }}" {% endif %} {% if publisher %} publisher: "{{ publisher }}" {% endif %} {% if place %} location: "{{ place }}" {% endif %} {% if pages %} pages: {{ pages }} {% endif %}

DOI

[{{ DOI }}](https://doi.org/{{ DOI }})

ISBN

[{{ ISBN }}](https://www.isbnsearch.org/isbn/{{ ISBN }})

Tags:

{% for t in tags %}#{{ t.tag | replace(' ', '-') | replace('&', 'and') | replace('<', '') | replace('>', '') | replace('#', '') | replace('*', '') | replace('(', '') | replace(')', '') | replace('[', '') | replace(']', '') }}{% if not loop.last %}, {% endif %}{% endfor %}

Contribution::

Related:: {% for relation in relations | selectattr("citekey") %} @{{relation.citekey}}{% if not loop.last %}, {% endif%} {% endfor %}

[!LINK] {%- for attachment in attachments | filterby("path", "endswith", ".pdf") %} [{{attachment.title}}](file://{{attachment.path | replace(" ", "%20")}}) {%- endfor -%}.

[!Abstract] {%- if abstractNote %} {{abstractNote}} {%- endif -%}.

Notes

{%- if markdownNotes %} {{markdownNotes}}{%- endif -%}.

Annotations

{%- macro calloutHeader(type, color) -%}
{%- if type == "highlight" -%}
Quote
{%- endif -%}

{%- if type == "text" -%}
Note
{%- endif -%}
{%- endmacro -%}

{% persist "annotations" %} {% set newAnnotations = annotations | filterby("date", "dateafter", lastImportDate) %} {% if newAnnotations.length > 0 %}

Imported: {{importDate | format("YYYY-MM-DD h:mm a")}}

{% for a in newAnnotations %} {{calloutHeader(a.type, a.color)}}

{{a.annotatedText}} {% endfor %} {% endif %} {% endpersist %}