Skip to content

Instantly share code, notes, and snippets.

@Delta-in-hub
Last active February 16, 2024 13:59
Show Gist options
  • Select an option

  • Save Delta-in-hub/3e5975937cc82ea6cae9b421210be729 to your computer and use it in GitHub Desktop.

Select an option

Save Delta-in-hub/3e5975937cc82ea6cae9b421210be729 to your computer and use it in GitHub Desktop.

Revisions

  1. Delta-in-hub revised this gist Nov 28, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -6,13 +6,13 @@

    | Key | Value |
    | :----------- | :-----------------------------------------------------------------------: |
    | Date | {{date | format("YYYY-MM")}} |
    | Date | {% if date %} {{date | format("YYYY-MM")}} {% endif %} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Others | {{archiveLocation}} {{libraryCatalog}} {{rights}} {{callNumber}} |
  2. Delta-in-hub revised this gist Nov 28, 2022. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -31,20 +31,22 @@
    {% 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}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}
    > {{annot.comment}}
    {% endif %}
    {% elif annot.type == "note" %}<mark style="background: {{annot.color}}">{{annot.comment | nl2br}} </mark> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})

    {% else %}<mark style="background: {{annot.color}}">{{annot.annotatedText | nl2br}} </mark> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}> {{annot.comment}}
    {% endif %}
    > ![]({{annot.imageRelativePath|replace(" ","%20")}}) [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}{{annot.comment}}{% endif %}
    {% elif annot.type == "note" %}> [!note]
    > <span style="color: {{annot.color}}">{{annot.comment | nl2br | replace("\n","")}} </span> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% else %}> [!Highlight]
    > <mark style="background: {{annot.color}}">{{annot.annotatedText | nl2br| replace("\n","")}} </mark> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}{{annot.comment}}{% endif %}
    {% endif %}{% endfor %}
    ***{% endif %}
    {% endpersist %}

    ## Zotero-Notes

    {{markdownNotes}}


  3. Delta-in-hub revised this gist Nov 28, 2022. 1 changed file with 24 additions and 18 deletions.
    42 changes: 24 additions & 18 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,35 @@
    # {{title}}
    > [!info] Bibliography
    > {{bibliography|replace("\n"," ")}}
    ## Information

    | Key | Value |
    | :----------- | :------------------------------------------------------------------------ |
    | Date | {{date | format("YYYY-MM")}} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Key | Value |
    | :----------- | :-----------------------------------------------------------------------: |
    | Date | {{date | format("YYYY-MM")}} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Others | {{archiveLocation}} {{libraryCatalog}} {{rights}} {{callNumber}} |
    | Zotero Link | {{pdfZoteroLink}} |
    | Zotero Link | {{pdfZoteroLink}} |

    ## Abstract
    > [!abstract]
    > {{abstractNote}}
    # Annotations
    ## 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")}}**
    {% 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}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}
    @@ -35,18 +41,18 @@
    {% if annot.comment %}> {{annot.comment}}
    {% endif %}
    {% endif %}{% endfor %}
    {% endif %}
    ***{% endif %}
    {% endpersist %}

    ## Zotero-Notes
    {{markdownNotes}}



    ## Notes
    %%Contents out of Obsidian-Notes will be cleared when update%%
    {% persist "Obsidian-Notes" %}



    {% endpersist %}
    {% endpersist %}
    > [!danger]
    > NEVER MODIFY ANYTHING BELOW
  4. Delta-in-hub revised this gist Nov 28, 2022. 1 changed file with 28 additions and 3 deletions.
    31 changes: 28 additions & 3 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -20,8 +20,33 @@
    ## Abstract
    > {{abstractNote}}
    ## Annotation
    {{formattedAnnotations}}
    # Annotations
    {% 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}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}
    > {{annot.comment}}
    {% endif %}
    {% elif annot.type == "note" %}<mark style="background: {{annot.color}}">{{annot.comment | nl2br}} </mark> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})

    {% else %}<mark style="background: {{annot.color}}">{{annot.annotatedText | nl2br}} </mark> [(p.{{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
    {% if annot.comment %}> {{annot.comment}}
    {% endif %}
    {% endif %}{% endfor %}
    {% endif %}
    {% endpersist %}

    ## Zotero-Notes
    {{markdownNotes}}



    ## Notes
    {{markdownNotes}}
    %%Contents out of Obsidian-Notes will be cleared when update%%
    {% persist "Obsidian-Notes" %}



    {% endpersist %}
  5. Delta-in-hub revised this gist Nov 27, 2022. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -3,25 +3,25 @@
    ## Information

    | Key | Value |
    | :----------- | :------------------------------------------------------ |
    | Date | {{date | format("YYYY-MM")}} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Location | {{archiveLocation}} {{libraryCatalog}} {{rights}} |
    | Zotero Link | {{pdfZoteroLink}} |
    | Key | Value |
    | :----------- | :------------------------------------------------------------------------ |
    | Date | {{date | format("YYYY-MM")}} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Others | {{archiveLocation}} {{libraryCatalog}} {{rights}} {{callNumber}} |
    | Zotero Link | {{pdfZoteroLink}} |

    ## Abstract
    > {{abstractNote}}
    ## Annotation
    {{formattedAnnotationsNew}}
    {{formattedAnnotations}}

    ## Notes
    {{markdownNotes}}
  6. Delta-in-hub created this gist Nov 26, 2022.
    27 changes: 27 additions & 0 deletions Template.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # {{title}}
    > {{bibliography|replace("\n"," ")}}
    ## Information

    | Key | Value |
    | :----------- | :------------------------------------------------------ |
    | Date | {{date | format("YYYY-MM")}} |
    | Author | {{authors}}{{directors}} |
    | Contributors | {{contributors}} |
    | Tags | {{hashTags}}, #zotero |
    | Journal | #{{publicationTitle | replace(" ","-")}} |
    | DOI | [{{DOI}}]({{url}}) |
    | Extra | {{extra | replace("\n","\t")}} |
    | Type | {{type}} {{itemType}} |
    | Publisher | {{publisher}} |
    | Location | {{archiveLocation}} {{libraryCatalog}} {{rights}} |
    | Zotero Link | {{pdfZoteroLink}} |

    ## Abstract
    > {{abstractNote}}
    ## Annotation
    {{formattedAnnotationsNew}}

    ## Notes
    {{markdownNotes}}