-
-
Save zudochkin/20ebc33e3a71d79f45cb8f62cc1a676b to your computer and use it in GitHub Desktop.
Revisions
-
QWxleA revised this gist
Aug 24, 2023 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # QWxlea's over-engineered zotero template ## Faq **What are these `%% begin id-pn2xitti%%` and `%% end id-pn2xitti %%` and `^pn2xitti`?** These are the persistance-markers of the indivual highlights, and the reference-id to that highlight. The markers are meant for the importer. It will skip all text within those markers, so they stay when updating a zotero-import. Removing a marked block does not work well, it will not be reimported. Don't know how to fix that. If you want to reimport a highlight-block, best is to change the highlight in zotero (for example change the color). This will update the id, and on the next import the new highlight will be imported. The reference-id is used like this: `[[@name-of-the-note#^pn2xitti]]` -
QWxleA revised this gist
Aug 5, 2023 . 1 changed file with 12 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ --- title: "{{title | safe}}" aliases: {#- Backwards compatible with older version, which had @title in the published url -#} {% set tempAlias = ["%40", citekey] | join | safe -%} - "{{ tempAlias }}" {% if shortTitle %}- {{shortTitle | safe}} @@ -98,7 +99,7 @@ permalink: "{{citekey | safe }}" %} # {{title}} > [!info] Info - [**Zotero**]({{desktopURI}}) {% if DOI %}| [**DOI**](https://doi.org/{{DOI}}){% endif %} | Local {% for attachment in attachments | filterby("path", "endswith", ".pdf") %}[**PDF**](file:///{{attachment.path | replace(" ", "%20")}}){%- endfor %} {% if ShortTitle %}> Short title: {{shortTitle | safe}}{% endif -%} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} {% if publicationTitle %}> Publication: {{publicationTitle | safe}}{% endif -%} @@ -110,8 +111,11 @@ permalink: "{{citekey | safe }}" > > **History** > Date item added to Zotero: [[{{dateAdded | format("YYYY-MM-DD")}}]] {%- if annotations %} > First date annotations or notes modified: [[{{minEditDate() | truncate(10,true,"")}}]] > Last date annotations or notes modified: [[{{maxEditDate()| truncate(10,true,"")}}]] {%- endif %} > Export date: [[{{exportDate | format("YYYY-MM-DD")}}]] {%- if relations.length > 0 %} {{ "" }} @@ -149,25 +153,27 @@ permalink: "{{citekey | safe }}" {% endpersist %} --- ## Annotations {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} {%- if entry.id %} {% if entry and loop.first %}## {{categoryIcon[zoteroColors[entry.color]]}} {{categoryHeading[zoteroColors[color]]}}{% endif %} {% set annoID = ["id-", entry.id] | join | lower %} {%- persist annoID %} {%- if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{ entry.annotatedText }}{% endif %} {%- if entry.imageBaseName %}![[@{{citekey}}/{{entry.imageBaseName}}|300]] {% endif %} {{printTags(entry.tags)}}<small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.page}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> {%- endif %} {% endpersist %} {# do not add "-", entry-id needs newline #} ^{{ entry.id | lower }} {%- if entry.comment %} >[!note] >{{entry.comment}} {% endif -%} {% endif -%} {# /if entry.id -#} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jul 29, 2023 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,14 @@ --- title: "{{title | safe}}" aliases: {% set tempAlias = ["%40", citekey] | join | safe -%} - "{{ tempAlias }}" {% if shortTitle %}- {{shortTitle | safe}} {% endif -%} Year: {{date | format("YYYY")}} tags: type/source Authors: {{authors}}{{directors}} permalink: "{{citekey | safe }}" --- {#- These can be changed -#} @@ -155,7 +160,8 @@ Authors: {{authors}}{{directors}} {%- persist annoID %} {%- if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{ entry.annotatedText }}{% endif %} {%- if entry.imageBaseName %}![[@{{citekey}}/{{entry.imageBaseName}}|300]] {% endif %} {%- if entry.comment %}ποΈ {{entry.comment}}{% endif %} {{printTags(entry.tags)}}<small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.page}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> {%- endif %} -
QWxleA revised this gist
Jul 29, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -154,10 +154,10 @@ Authors: {{authors}}{{directors}} {% set annoID = ["id-", entry.id] | join | lower %} {%- persist annoID %} {%- if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{ entry.annotatedText }}{% endif %} {%- if entry.imageBaseName %}![[Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br>{% endif %} {%- if entry.comment %}ποΈ {{entry.comment}}{% endif %} {{printTags(entry.tags)}}<small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.page}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> {%- endif %} {% endpersist %} {# do not add "-", entry-id needs newline #} ^{{ entry.id | lower }} -
QWxleA revised this gist
Jul 29, 2023 . 1 changed file with 11 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Year: {{date | format("YYYY")}} tags: type/source Authors: {{authors}}{{directors}} --- {#- These can be changed -#} {#- This is the order in which the annotations are ordered -#} {%- @@ -124,7 +125,7 @@ Authors: {{authors}}{{directors}} {{ "" }} {%- for note in notes -%} {#- Clean up note, change heading level, just in case -#} > {{ note.note | replace ("# ","### ") | replace(r/\n/g, '\n> ')}} > {{printTags(note.tags)}} > <small>ποΈ (modified: {{ note.dateModified | format("YYYY-MM-DD") }}) [link](zotero://select/library/items/{{note.key}}) - [web]({{note.uri}})</small> > {{ "" }} @@ -140,26 +141,27 @@ Authors: {{authors}}{{directors}} --- ## Persistant notes {% persist "notes" %} {% endpersist %} --- # Annotations <small>(Exported: [[{{exportDate | format("YYYY-MM-DD")}}]]</small>) {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} {%- if entry.id %} {%- if entry and loop.first %}## {{categoryIcon[zoteroColors[entry.color]]}} {{categoryHeading[zoteroColors[color]]}}{% endif %} {% set annoID = ["id-", entry.id] | join | lower %} {%- persist annoID %} {%- if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{ entry.annotatedText | replace(r/\n/g, ' ') }}{% endif %} {%- if entry.imageBaseName %}![[Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br>{% endif %} {%- if entry.comment %}ποΈ {{entry.comment}}{% endif %} {{printTags(entry.tags)}}<small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.pageLabel}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> {%- endif %} {% endpersist %} {# do not add "-", entry-id needs newline #} ^{{ entry.id | lower }} {% endif -%} {# /if entry.id -#} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 7, 2023 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -151,14 +151,14 @@ Authors: {{authors}}{{directors}} {%- if entry.id %} {%- if entry and loop.first %}## {{categoryIcon[zoteroColors[entry.color]]}} {{categoryHeading[zoteroColors[color]]}}{% endif %} {% set annoID = ["id-", entry.id] | join | lower %} {%- persist annoID %} {% if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{entry.annotatedText}}{% endif %} {%- if entry.imageBaseName %}![[Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br>{% endif %} {%- if entry.comment %}ποΈ {{entry.comment}}{% endif %} {{printTags(entry.tags)}} <small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.pageLabel}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> ^{{ entry.id | lower }} {% endif %} {# needs a newline so the reference id doesn't break #} {%- endpersist %} {% endif -%} {# entry.id #} {% endfor -%} -
QWxleA revised this gist
Jun 6, 2023 . 1 changed file with 10 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -149,16 +149,17 @@ Authors: {{authors}}{{directors}} {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} {%- if entry.id %} {%- if entry and loop.first %}## {{categoryIcon[zoteroColors[entry.color]]}} {{categoryHeading[zoteroColors[color]]}}{% endif %} {% set annoID = ["id-", entry.id] | join | lower %} {% persist annoID %} {% if entry.date > lastExportDate %} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{entry.annotatedText}}{% endif %} {%- if entry.imageBaseName %}![[Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br>{% endif %} {%- if entry.comment %}ποΈ {{entry.comment}}{% endif %} {{printTags(entry.tags)}} <small>([{{title | truncate(50)}} p.{{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.pageLabel}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> ^{{ entry.id | lower }} {%- endif %} {% endpersist %} {% endif -%} {# entry.id #} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 5, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -157,7 +157,7 @@ Authors: {{authors}}{{directors}} {%- endif %} {%- if entry.comment %}ποΈ {{entry.comment}} {% endif -%} {{printTags(entry.tags)}} <small>([p. {{entry.pageLabel}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.pageLabel}}&annotation={{entry.id}})) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> ^{{ entry.id | lower }} {% endif -%} {% endfor -%} -
QWxleA revised this gist
Jun 4, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -153,7 +153,7 @@ Authors: {{authors}}{{directors}} {% endif -%} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{entry.annotatedText}} {% endif -%} {%- if entry.imageBaseName %}>![[Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br> {%- endif %} {%- if entry.comment %}ποΈ {{entry.comment}} {% endif -%} -
QWxleA revised this gist
Jun 4, 2023 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,18 +89,17 @@ Authors: {{authors}}{{directors}} "#e56eee": "magenta", "#aaaaaa": "grey" } %} # {{title}} > [!info]- Info - [**Zotero**]({{desktopURI}}) {% if DOI %}| [**DOI**](https://doi.org/{{DOI}}){% endif %} | Local {% for attachment in attachments | filterby("path", "endswith", ".pdf") %}[**PDF**](file:///{{attachment.path | replace(" ", "%20")}}){%- endfor %} {% if ShortTitle %}> Short title: {{shortTitle | safe}}{% endif -%} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} {% if publicationTitle %}> Publication: {{publicationTitle | safe}}{% endif -%} > Type: {{itemType}} > Year: {{date | format("YYYY")}} > Zotero links: [Item]({{select}}) {% if pdfZoteroLink %}PDF: {{pdfZoteroLink}}{% endif %} > Web links: {% if itemType == "webpage" %}[{{title}}]({{url}}){%else%}[Item]({{uri}}){%endif%} {% if pdfLink %}PDF: {{pdfLink}}{% endif %} > {{printTags(note.tags)}} > > **History** -
QWxleA revised this gist
Jun 4, 2023 . No changes.There are no files selected for viewing
-
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,9 @@ Authors: {{authors}}{{directors}} } -%} # {{title}} > [!info]- Info - [**Zotero**]({{desktopURI}}) | [**DOI**](https://doi.org/{{DOI}}) | Local {% for attachment in attachments | filterby("path", "endswith", ".pdf") %}[**PDF**](file:///{{attachment.path | replace(" ", "%20")}}){%- endfor %} > {% if ShortTitle %}Short title: {{shortTitle | safe}}{% endif %} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} > Publication: {{publicationTitle}} @@ -106,7 +108,8 @@ Authors: {{authors}}{{directors}} > First date annotations or notes modified: [[{{minEditDate() | truncate(10,true,"")}}]] > Last date annotations or notes modified: [[{{maxEditDate()| truncate(10,true,"")}}]] {%- if relations.length > 0 %} {{ "" }} > [!abstract] Related Zotero items ({{ relations.length}}): > > | title | proxy note | desktopURI | @@ -136,14 +139,13 @@ Authors: {{authors}}{{directors}} > {% endif %} --- ## Persistant notes {% persist "notes" %} {% endpersist %} --- # Annotations <small>(Exported: [[{{exportDate | format("YYYY-MM-DD")}}]]</small>) {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} @@ -161,5 +163,3 @@ Authors: {{authors}}{{directors}} {% endif -%} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -136,7 +136,7 @@ Authors: {{authors}}{{directors}} > {% endif %} --- ## Personal notes {% persist "notes" %} {% endpersist %} @@ -157,6 +157,7 @@ Authors: {{authors}}{{directors}} {%- if entry.comment %}ποΈ {{entry.comment}} {% endif -%} {{printTags(entry.tags)}} <small>[Page {{entry.page}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.page}}) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> ^{{ entry.id | lower }} {% endif -%} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 39 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,39 @@ Authors: {{authors}}{{directors}} } -%} {#- ---------- Don't make any changes under here --------- #} {%- macro minEditDate() -%} {%- set tempDate = "" -%} {%- for a in annotations -%} {%- set testDate = a.date | format("YYYY-MM-DD#HH:mm:ss") -%} {%- if testDate < tempDate or tempDate == ""-%} {%- set tempDate = testDate -%} {%- endif -%} {%- endfor -%} {%- for a in notes -%} {%- set testDate = a.dateModified | format("YYYY-MM-DD#HH:mm:ss") -%} {%- if testDate < tempDate or tempDate == ""-%} {%- set tempDate = testDate -%} {%- endif -%} {%- endfor -%} {{tempDate }} {%- endmacro -%} {# infer latest note date #} {%- macro maxEditDate() -%} {%- set tempDate = "" -%} {%- for n in annotations -%} {%- set testDate = n.date | format("YYYY-MM-DD#HH:mm:ss") -%} {%- if testDate > tempDate or tempDate == ""-%} {%- set tempDate = testDate -%} {%- endif -%} {%- endfor -%} {%- for n in notes -%} {%- set testDate = n.dateModified | format("YYYY-MM-DD#HH:mm:ss") -%} {%- if testDate > tempDate or tempDate == ""-%} {%- set tempDate = testDate -%} {%- endif -%} {%- endfor -%} {{tempDate}} {%- endmacro -%} {#- handle | characters in zotero strings used in MD -#} {% macro formatCell(cellText) -%} {{ cellText | replace("|","β")}} @@ -69,10 +102,11 @@ Authors: {{authors}}{{directors}} > {{printTags(note.tags)}} > > **History** > Date item added to Zotero: [[{{dateAdded | format("YYYY-MM-DD")}}]] > First date annotations or notes modified: [[{{minEditDate() | truncate(10,true,"")}}]] > Last date annotations or notes modified: [[{{maxEditDate()| truncate(10,true,"")}}]] {%- if relations.length > 0 -%} > [!abstract] Related Zotero items ({{ relations.length}}): > > | title | proxy note | desktopURI | @@ -126,3 +160,5 @@ Authors: {{authors}}{{directors}} {% endif -%} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 42 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,33 @@ Year: {{date | format("YYYY")}} tags: type/source Authors: {{authors}}{{directors}} --- {#- These can be changed -#} {#- This is the order in which the annotations are ordered -#} {%- set categoryHeading = { "orange": "Main ideas and conclusions", "yellow": "Ordinary notes", "blue": "Quote / quotable", "green": "Important To Me", "red": "Disagree With Author", "purple": "Interesting side-point", "magenta": "Methodology", "grey": "Definitions and concepts" } -%} {%- set categoryIcon = { "orange": "π‘", "yellow": "π", "blue": "π¬", "green": "π", "red": "β", "purple": "π", "magenta": "βοΈ", "grey": "π§©" } -%} {#- ---------- Don't make any changes under here --------- #} {#- handle | characters in zotero strings used in MD -#} {% macro formatCell(cellText) -%} {{ cellText | replace("|","β")}} @@ -30,19 +57,6 @@ Authors: {{authors}}{{directors}} "#aaaaaa": "grey" } -%} > [!note] {{title}} > {% if ShortTitle %}Short title: {{shortTitle | safe}}{% endif %} @@ -82,24 +96,29 @@ Authors: {{authors}}{{directors}} {% endfor %} {% endif -%} > [!abstract]- > {% if abstractNote %} > {{abstractNote|replace("\n"," ")}} > {% endif %} --- ## Notes {% persist "notes" %} {% endpersist %} --- # Annotations <small>Exported: [[{{exportDate | format("YYYY-MM-DD")}}]]</small> {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} {%- if entry.id %} {%- if entry and loop.first %}## {{categoryIcon[zoteroColors[entry.color]]}} {{categoryHeading[zoteroColors[color]]}} {% endif -%} {%- if entry.annotatedText %}{{categoryIcon[zoteroColors[entry.color]]}} {{entry.annotatedText}} {% endif -%} {%- if entry.imageBaseName %}>![[/Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br> {%- endif %} {%- if entry.comment %}ποΈ {{entry.comment}} {% endif -%} -
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 42 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,31 @@ Authors: {{authors}}{{directors}} {%- endfor -%} {%- endif -%} {%- endmacro %} {%- set zoteroColors = { "#ff6666": "red", "#f19837": "orange", "#5fb236": "green", "#ffd400": "yellow", "#2ea8e5": "blue", "#a28ae5": "purple", "#e56eee": "magenta", "#aaaaaa": "grey" } -%} {#- This is the order in which the annotations are ordered -#} {%- set colorHeading = { "orange": "π‘ Main ideas and conclusions", "yellow": "π Ordinary notes", "blue": "π¬ Quote / quotable", "green": "π Important To Me", "red": "β Disagree With Author", "purple": "π Interesting side-point", "magenta": "βοΈ Methodology", "grey": "π§© Definitions and concepts" } -%} > [!note] {{title}} > {% if ShortTitle %}Short title: {{shortTitle | safe}}{% endif %} @@ -64,14 +89,21 @@ Authors: {{authors}}{{directors}} {% for note in notes %}{% endfor %} --- > [!abstract] Annotations > <small>Exported: [[{{exportDate | format("YYYY-MM-DD")}}]]</small> {% for color, colorCategorie in zoteroColors %} {%- for entry in annotations | filterby ("color", "startswith", color) -%} {%- if entry.id %} {%- if entry and loop.first %}## {{colorHeading[zoteroColors[color]]}} {% endif -%} {%- if entry.id %}{{entry.annotatedText}} {% endif -%} {%- if entry.imageBaseName %}![[/Assets/@{{citekey}}/{{entry.imageBaseName}}|300]]<br> {%- endif %} {%- if entry.comment %}ποΈ {{entry.comment}} {% endif -%} {{printTags(entry.tags)}} <small>[Page {{entry.page}}](zotero://open-pdf/library/items/{{entry.attachment.itemKey}}?page={{entry.page}}) edited:[[{{ entry.date | format("YYYY-MM-DD")}}]]</small> ^{{ entry.id | lower }} {% endif -%} {% endfor -%} {% endfor -%} -
QWxleA revised this gist
Jun 3, 2023 . 1 changed file with 44 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,42 +5,70 @@ Year: {{date | format("YYYY")}} tags: type/source Authors: {{authors}}{{directors}} --- {#- handle | characters in zotero strings used in MD -#} {% macro formatCell(cellText) -%} {{ cellText | replace("|","β")}} {%- endmacro %} {#- TAGS: handle space characters in zotero tags -#} {%- set space = joiner(' ') -%} {%- macro printTags(rawTags) -%} {%- if rawTags.length > 0 -%} {%- for tag in rawTags -%} #{{ tag.tag | lower | replace(" ","_") }} {{ space() }} {%- endfor -%} {%- endif -%} {%- endmacro %} > [!note] {{title}} > {% if ShortTitle %}Short title: {{shortTitle | safe}}{% endif %} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} > Publication: {{publicationTitle}} > Year: {{date | format("YYYY")}} {% if DOI %}> DOI: **{{DOI}}**{% endif %} > Zotero links: [Item]({{select}}) {% if pdfZoteroLink %}PDF: {{pdfZoteroLink}}{% endif %} > Web links: [Item]({{uri}}) {% if pdfLink %}PDF: {{pdfLink}}{% endif %} > {{printTags(note.tags)}} > > **History** > Date added to Zotero: [[{{dateAdded | format("YYYY-MM-DD")}}]] > Last date modified: [[{{dateModified | format("YYYY-MM-DD")}}]] {% if relations.length > 0 -%} > [!abstract] Related Zotero items ({{ relations.length}}): > > | title | proxy note | desktopURI | > | --- | --- | --- | {%- for r in relations %} > | {{formatCell(r.title)}} | [[@{{r.citekey}}]] | [Zotero Link]({{r.desktopURI}}) | {% if rel.DOI %}> DOI: {{rel.DOI}}{% endif %} | {%- endfor -%} {{ "" }} {%- endif %} {% if notes.length > 0 %} > [!note] Notes ({{notes.length}}) {{ "" }} {%- for note in notes -%} {#- Clean up note, change heading level, just in case -#} > {{ note.note | replace ("# ","### ") }} > {{printTags(note.tags)}} > <small>ποΈ (modified: {{ note.dateModified | format("YYYY-MM-DD") }}) [link](zotero://select/library/items/{{note.key}}) - [web]({{note.uri}})</small> > {{ "" }} > --- {% endfor %} {% endif -%} {% if abstractNote %} ### Abstract {{abstractNote}} {% endif %} {% for note in notes %}{% endfor %} --- > [!Abstract] Annotations > Exported: [[{{exportDate | format("YYYY-MM-DD")}}]] {% for annotation in annotations %} {% if annotation.annotatedText %}<mark style="background-color: {{annotation.color}};color: black">{% if (annotation.colorCategory == "Yellow") %}Highlight{% elif (annotation.colorCategory == "Orange") %}π‘ Main ideas and conclusions{% elif (annotation.colorCategory == "Red") %}β Disagree{% elif (annotation.colorCategory == "Green") %}π Important to Me{% elif (annotation.colorCategory == "Purple") %}π¬ Quote{% elif (annotation.colorCategory == "Blue") %}π Interesting side-point{% elif (annotation.colorCategory == "Magenta") %}βοΈ Method{% elif (annotation.colorCategory == "Gray") %}π§© Definitions and concepts{% else %}Other{% endif %}</mark> [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) <small>({% if ShortTitle %}{{shortTitle | safe}}{% else %}{{title}}{% endif %})</small> {{annotation.annotatedText}} ^{{ annotation.id | lower }}{% endif %} {% if annotation.comment %}>[!Note] Comment [[{{ annotation.date | format("YYYY-MM-DD")}}]] > [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) {% if annotation.hashTags %} {{ annotation.hashTags }}{% endif %} -
QWxleA revised this gist
May 28, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Authors: {{authors}}{{directors}} > Exported: [[{{exportDate | format("YYYY-MM-DD")}}]] {% for annotation in annotations %} {% if annotation.annotatedText %}<mark style="background-color: {{annotation.color}};color: black">{% if (annotation.colorCategory == "Yellow") %}Highlight{% elif (annotation.colorCategory == "Orange") %}π‘ Main ideas and conclusions{% elif (annotation.colorCategory == "Red") %}β Disagree{% elif (annotation.colorCategory == "Green") %}π Important to Me{% elif (annotation.colorCategory == "Purple") %}π¬ Quote{% elif (annotation.colorCategory == "Blue") %}π Interesting side-point{% elif (annotation.colorCategory == "Magenta") %}βοΈ Method{% elif (annotation.colorCategory == "Gray") %}π§© Definitions and concepts{% else %}Other{% endif %}</mark> [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) <small>({% if ShortTitle %}{{shortTitle | safe}}{% else %}{{title}}{% endif %})</small> {{annotation.annotatedText}} ^{{ annotation.id | lower }}{% endif %} {% if annotation.comment %}>[!Note] Comment [[{{ annotation.date | format("YYYY-MM-DD")}}]] > [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) {% if annotation.hashTags %} {{ annotation.hashTags }}{% endif %} -
QWxleA revised this gist
May 28, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Authors: {{authors}}{{directors}} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} > Publication: {{publicationTitle}} > Year: {{date | format("YYYY")}} {% if DOI %}> DOI: **{{DOI}}**{% endif %} > Zotero PDF link: {{pdfZoteroLink}} > PDF: {{pdfLink}} > Web link: {{uri}} -
QWxleA created this gist
May 28, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ --- title: "{{title | safe}}" alias: {% if ShortTitle %}"{{shortTitle | safe}}"{% endif %} Year: {{date | format("YYYY")}} tags: type/source Authors: {{authors}}{{directors}} --- > [!note] {{title}} > {% if ShortTitle %}Short title: {{shortTitle | safe}}{% endif %} > Authors: {% for c in creators %}[[{{c.firstName}} {{c.lastName}}]] {% endfor %} > Publication: {{publicationTitle}} > Year: {{date | format("YYYY")}} > DOI: **{{DOI}}** > Zotero PDF link: {{pdfZoteroLink}} > PDF: {{pdfLink}} > Web link: {{uri}} {% if hashTags %}> > {% for t in tags %}#{{t.tag}}{% if not loop.last %} {% endif %}{% endfor %}{% endif %} {% if relations %} {% for rel in relations %} > [!abstract] Related: [[@{{ rel.citationKey }}]] > Zotero: [{{rel.title}}]({{rel.desktopURI}}) {% if rel.DOI %}> DOI: {{rel.DOI}}{% endif %} {% endfor %}{% endif %} --- > [!info] Item history > Date added to Zotero: [[{{dateAdded | format("YYYY-MM-DD")}}]] > Last date modified: [[{{dateModified | format("YYYY-MM-DD")}}]] {% if abstractNote %} ### Abstract {{abstractNote}} {% endif %} --- > [!Abstract] Annotations > Exported: [[{{exportDate | format("YYYY-MM-DD")}}]] {% for annotation in annotations %} {% if annotation.annotatedText %}<mark style="background-color: {{annotation.color}};color: black">{% if (annotation.colorCategory == "Yellow") %}Highlight{% elif (annotation.colorCategory == "Orange") %}π‘ Main ideas and conclusions{% elif (annotation.colorCategory == "Red") %}β Disagree{% elif (annotation.colorCategory == "Green") %}π Important to Me{% elif (annotation.colorCategory == "Purple") %}π¬ Quote{% elif (annotation.colorCategory == "Blue") %}π Interesting side-point{% elif (annotation.colorCategory == "Magenta") %}βοΈ Method{% elif (annotation.colorCategory == "Gray") %}π§© Definitions and concepts{% else %}Other{% endif %}</mark> [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) {{annotation.annotatedText}} ^{{ annotation.id | lower }}{% endif %} {% if annotation.comment %}>[!Note] Comment [[{{ annotation.date | format("YYYY-MM-DD")}}]] > [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) {% if annotation.hashTags %} {{ annotation.hashTags }}{% endif %} > {{annotation.comment}}{% endif %} {% if annotation.imageRelativePath %}![[{{annotation.imageRelativePath}}]]{% endif %} {% endfor %}