├── zotero_integration.md └── README.md /zotero_integration.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: 3 | title: {{title}} 4 | authors: {{authors}} 5 | year: {{date | format("YYYY")}} 6 | publisher: {{publicationTitle}} 7 | keywords: [{{allTags}}] 8 | citekey: {{citekey}} 9 | --- 10 | > [!meta]- Metadata 11 | > abstract:: {{abstractNote}} 12 | > zotero_link:: {{pdfZoteroLink}} 13 | > Related:: {% for relation in relations -%} {%- if relation.citekey -%} [[{{relation.citekey}}]], {% endif -%} {%- endfor%} 14 | > url:: {{url}} 15 | > doi:: {{doi}} 16 | > bibliography:: {{bibliography}} 17 | 18 | --- 19 | ### Webpage 20 | 21 | 22 | --- 23 | 24 | ### Self Notes 25 | {% persist "notes" %} 26 | 27 | 28 | {% endpersist %} 29 | 30 | --- 31 | 32 | ## Reading notes 33 | {% persist "annotations" %} 34 | 35 | {%- 36 | set zoteroColors = { 37 | "#2ea8e5": "blue", 38 | "#5fb236": "green", 39 | "#a28ae5": "purple", 40 | "#ff6666": "red", 41 | "#ffd400": "yellow", 42 | "#f19837": "orange", 43 | "#aaaaaa": "grey", 44 | "#e56eee": "magenta" 45 | } 46 | -%} 47 | 48 | {%- 49 | set colorHeading = { 50 | "blue": "ℹ Background information, Prerequisites", 51 | "green": "❓ Assumptions, Questions, Goals, Problems", 52 | "purple": "📊 Main findings, Results, Conclusions", 53 | "red": "🧪Experimental details or Methods", 54 | "yellow": "⭐ Interesting point, Facts, Examples", 55 | "orange": "⚠️ Disagree with author", 56 | "grey": "📅 Vocabulary, Names, Dates, Definitions", 57 | "magenta": "📄 Important references" 58 | } 59 | -%} 60 | 61 | {%- macro calloutHeader(type) -%} 62 | {%- switch type -%} 63 | {%- case "highlight" -%} 64 | Highlight 65 | {%- case "image" -%} 66 | Image 67 | {%- default -%} 68 | Note 69 | {%- endswitch -%} 70 | {%- endmacro %} 71 | 72 | {%- set newAnnot = [] -%} 73 | {%- set newAnnotations = [] -%} 74 | {%- set annotations = annotations | filterby("date", "dateafter", lastImportDate) %} 75 | 76 | {% if annotations.length > 0 %} 77 | *Imported: {{importDate | format("YYYY-MM-DD HH:mm")}}* 78 | 79 | {%- for annot in annotations -%} 80 | 81 | {%- if annot.color in zoteroColors -%} 82 | {%- set customColor = zoteroColors[annot.color] -%} 83 | {%- elif annot.colorCategory|lower in colorHeading -%} 84 | {%- set customColor = annot.colorCategory|lower -%} 85 | {%- else -%} 86 | {%- set customColor = "other" -%} 87 | {%- endif -%} 88 | 89 | {%- set newAnnotations = (newAnnotations.push({"annotation": annot, "customColor": customColor}), newAnnotations) -%} 90 | 91 | {%- endfor -%} 92 | 93 | {#- INSERT ANNOTATIONS -#} 94 | {#- Loops through each of the available colors and only inserts matching annotations -#} 95 | {#- This is a workaround for inserting categories in a predefined order (instead of using groupby & the order in which they appear in the PDF) -#} 96 | 97 | {%- for color, heading in colorHeading -%} 98 | {%- for entry in newAnnotations | filterby ("customColor", "startswith", color) -%} 99 | {%- set annot = entry.annotation -%} 100 | 101 | {%- if entry and loop.first %} 102 | 103 | ### {{colorHeading[color]}} 104 | {%- endif %} 105 | 106 | > [!quote{{"|" + color if color != "other"}}]+ {{calloutHeader(annot.type)}} ([page. {{annot.pageLabel}}](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.pageLabel}}&annotation={{annot.id}})) 107 | 108 | {%- if annot.annotatedText %} 109 | > {{annot.annotatedText|nl2br}} {% if annot.hashTags %}{{annot.hashTags}}{% endif -%} 110 | {%- endif %} 111 | 112 | {%- if annot.imageRelativePath %} 113 | > ![[{{annot.imageRelativePath}}]] 114 | {%- endif %} 115 | 116 | {%- if annot.ocrText %} 117 | > {{annot.ocrText}} 118 | {%- endif %} 119 | 120 | {%- if annot.comment %} 121 | > - **{{annot.comment|nl2br}}** 122 | {%- endif -%} 123 | 124 | {%- endfor -%} 125 | {%- endfor -%} 126 | {% endif %} 127 | {% endpersist %} 128 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Zotero Obsidian Integration 3 | 4 | I am delighted to present this guide on the installation of Zotero Obsidian integration, a powerful combination that enhances your research and note-taking experience. Zotero, a widely acclaimed reference management tool, seamlessly integrates with Obsidian, a dynamic note-taking platform, offering a streamlined workflow for researchers, academics, and enthusiasts alike. In this comprehensive tutorial, we will walk you through the step-by-step process of installing and configuring the Zotero Obsidian integration, unlocking a world of possibilities for organizing your references and connecting them to your notes. 5 | 6 | # Plugin 7 | Better BibTeX for Zotero : https://retorque.re/zotero-better-bibtex/installation/ 8 | 9 | ![1](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/276037ea-06f3-4346-93c5-224fc87772ea) 10 | 11 | From this page, click the latest release. will open GitHub page 12 | https://github.com/retorquere/zotero-better-bibtex/releases/tag/v6.7.150 13 | 14 | ![2](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/52637b9f-84a6-4666-8a48-2f1552932629) 15 | 16 | Download the file with extension .xpi 17 | 18 | # Zotero Configuration 19 | Open Zotero then click on Tools-> Add-ons 20 | ![3](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/a7d197b5-ae70-4642-97b5-473405a5d737) 21 | 22 | # Zotero Add-ons Manager 23 | 24 | ![4](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/04476e57-f76f-4644-9b3f-123b0ed5f096) 25 | 26 | To install the plugin, we can drag and drop the xpi file to the add-ons manager or click the setting icon, then click the Install add-ons from the file. 27 | 28 | ![5](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/59582cf7-3f6e-4851-8ed7-ec3bf7bb7be9) 29 | 30 | # Installation page 31 | On the next screen, display the installation page. 32 | Click the Install Now button, then follow the instructions. 33 | ![6](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/692eb9d5-0822-43d2-ac3c-8d311aa9ac39) 34 | 35 | # Plugin Installation is complete 36 | ![7](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/2e6f922c-df3a-44f3-803f-89401a6e83e9) 37 | 38 | # Integration 39 | Now you can open the obsidian, create a new folder, and then give the folder name template. 40 | In this step, we need the template file. Download the file from GitHub, then drag and drop it into the template folder. 41 | 42 | ![8](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/efb76149-4593-45ca-94af-350a4536edf4) 43 | 44 | 45 | Template file: https://github.com/aprijunaidi/zotero_obsidian_integration/blob/main/zotero_integration.md 46 | source file : https://raw.githubusercontent.com/muhammadammarzahid/zotero_obsidian/7ad6785e8aedd91b28444efc40061c6894a3266d/zotero_integration.md 47 | 48 | # The Template uploaded 49 | 50 | ![9](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/a2b6aca4-15f9-476e-a299-f54251cd3e9e) 51 | 52 | 53 | # The Obsidian Plugins configuration 54 | 55 | Back to Obsidian, click the setting icon on the left bottom. Click the Community plugin-> click Browse button. 56 | 57 | ![10](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/ea331a13-5dd9-44fd-89e4-58983086a72c) 58 | 59 | ### Then find the Zotero Integration and click Install-> click enable. 60 | ![11](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/c8cb1f55-c8ea-4f73-b67b-aed323a06ba4) 61 | 62 | ### Click on the options button, then click Download the PDF Utility. 63 | 64 | ![12](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/36aa069a-3933-4f3e-8674-d20350b9d63c) 65 | 66 | ![13](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/5669311d-a688-4953-804c-71eaa7b55a18) 67 | 68 | ### Go to the database, then choose Zotero. 69 | ![14](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/73f75733-f860-4997-8e01-3908d8313347) 70 | 71 | ### Enable for Open the created or updated note(s) after import. 72 | ![15](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/97fa94e4-2097-4684-bca9-a815f8ecfc4d) 73 | 74 | ### Then enable Annotation and Concatenation. 75 | ![16](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/f5244101-f24c-4895-bd3d-415bf4b3f77a) 76 | 77 | ### Scroll down and click on Add Import Format. 78 | ![17](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/73ca725d-9d62-4680-9802-5221168778ec) 79 | 80 | ### Please input the following text. 81 | 82 | For the name field type: import annotations 83 | 84 | Zotero path : zotero_annotations/{{citekey}}.md 85 | 86 | Image Output path: zotero_annotations/{{citekey}}/ 87 | 88 | For the Template File: template/zotero_integration.md 89 | 90 | ### Result. 91 | ![18](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/3d210f79-d0fb-4603-9457-f614454584a6) 92 | 93 | 94 | ### Bibliography Style : Click on Hotkeys tab, search in filter import 95 | ![19](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/fc97c6da-d6db-42a7-abcd-f3aaf72e85c7) 96 | 97 | ### On keyboard press Ctrl + Shift + I 98 | ![20](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/57a35ef2-0840-4bd3-8bcd-900c770f057c) 99 | 100 | # Installation Complete 101 | 102 | # Testing 103 | Close the plugin page, back to the obsidian page. 104 | Press on keyboard then press Ctrl + Shift+ I, wait until the Zotero plugin displays on the screen. 105 | 106 | ### Type the keyword to find the article, for example object then choose the article title, press enter. 107 | 108 | ![21](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/c6e9d622-e3aa-4185-b060-7e2e1c8e8c41) 109 | 110 | # The Final Result 111 | ![22](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/10ac2562-db94-4cb9-927a-c36f6d672eb8) 112 | 113 | # Contribution :hammer_and_wrench: 114 | 115 | Please [create an Issue](https://github.com/aprijunaidi/zotero_obsidian_integration/issues) for any improvements, suggestions, or errors in the content. 116 | 117 | [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Faprijunaidi%2Fzotero_obsidian_integration&countColor=%23263759&style=plastic)](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2Faprijunaidi%2Fzotero_obsidian_integration) 118 | 119 | 120 | ![23](https://github.com/aprijunaidi/zotero_obsidian_integration/assets/7279471/b917f7ea-b060-467b-9202-8a97a49e7f34) 121 | --------------------------------------------------------------------------------