Skip to content

Instantly share code, notes, and snippets.

@Delta-in-hub
Last active February 16, 2024 13:59
Show Gist options
  • Save Delta-in-hub/3e5975937cc82ea6cae9b421210be729 to your computer and use it in GitHub Desktop.
Save Delta-in-hub/3e5975937cc82ea6cae9b421210be729 to your computer and use it in GitHub Desktop.
Obsidian-Zotero-Integration Template

{{title}}

[!info] Bibliography {{bibliography|replace("\n"," ")}}

Information

Key Value
Date {% if date %} {{date
Author {{authors}}{{directors}}
Contributors {{contributors}}
Tags {{hashTags}}, #zotero
Journal #{{publicationTitle
DOI {{DOI}}
Extra {{extra
Type {{type}} {{itemType}}
Publisher {{publisher}}
Others {{archiveLocation}} {{libraryCatalog}} {{rights}} {{callNumber}}
Zotero Link {{pdfZoteroLink}}

Abstract

[!abstract] {{abstractNote}}

Annotations

Warning

ANYTHING OUT OF %begin%...%end% BLOCK WILL BE CLEARED WHEN UPDATE

{% persist "annotations" %} {% set annots = annotations | filterby("date", "dateafter", lastImportDate) %} {% if annots.length > 0 %}Imported on {{importDate | format("YYYY-MM-DD HH:mm")}}


{% for annot in annots %}{% if annot.type == "image" %}> [!Image]

![]({{annot.imageRelativePath|replace(" ","%20")}}) (p.{{annot.page}})

{% if annot.comment %}{{annot.comment}}{% endif %} {% elif annot.type == "note" %}> [!note]

{{annot.comment | nl2br | replace("\n","")}} (p.{{annot.page}})

{% else %}> [!Highlight]

{{annot.annotatedText | nl2br| replace("\n","")}} (p.{{annot.page}})

{% if annot.comment %}{{annot.comment}}{% endif %} {% endif %}{% endfor %} ***{% endif %} {% endpersist %}

Zotero-Notes

{{markdownNotes}}

Notes

{% persist "Obsidian-Notes" %}

{% endpersist %}

[!danger] NEVER MODIFY ANYTHING BELOW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment