使用Obsidian Zotero Integration导出文献笔记注释
简介
想在Obsidian中记录一下看过的文献和里面的关键信息,便于以后参考,最近刚开始用Zotero管理文献,就搜了下怎么样导出在Zotero中对文献PDF做的笔记,包括各种颜色的高亮、注释等。
软件和插件版本:
Obsidian: V1.0.3
Zotero Integration: 2.2.31
Zotero: 6.0.18
Better BibTeX for Zotero: 6.7.42
Zotero中
似乎是只需要安装插件:Better BibTeX for Zotero
例如对下面这篇文献做了一些笔记,包括高亮、注释、选中区域:
Obsidian设置
Zotero Integration设置
如下,定义一个自己的Import Format
,名为my_import
,主要设置笔记存放位置、文件名、模板
。
模板
基于参考资料中现成的模板修改而来:
主要是:
- 提取了一些文献的信息,以后可能用
dataview
筛选。
You can view the data available to templates using the
Data Explorer
command in Obsidian’s command pallette.
- 导出各种笔记,包括高亮、注释、选中区域
- 笔记区域,通过设置
persist
,再次导入时这部分内容会被保留。
%Zotero_import_note%
# Information
Title:: {{title}}
Year:: {{date | format("YYYY")}}
Authors:: {{authors}}
Publication:: {{publicationTitle}}
Zotero PDF Link:: {{pdfLink}}
Citation:: {{bibliography}}
# Notes
{% persist "notes" %}
{% endpersist %}
# Annotations
{%- macro calloutHeader(type, color) -%}
{%- if type == "highlight" -%}
<mark style="background-color: {{color}}">Highlight</mark>
{%- endif -%}{%- if type == "text" -%}
Note
{%- endif -%}
{%- endmacro -%}
{%- set annots = annotations -%}
{%- if annots.length > 0 %}
Exported: {{exportDate | format("YYYY-MM-DD h:mm a")}}
{% for annot in annots -%}
#### page {{annot.page}} date: {{annot.date | format("YYYY-MM-DD")}}
Link: [page {{annot.page}}](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})
{{calloutHeader(annot.type, annot.color)}}
{%- if annot.annotatedText %}
> {{annot.annotatedText | nl2br}}
{%- endif -%}
{%- if annot.imageRelativePath %}
> ![[{{annot.imageRelativePath}}]]
{%- endif %}
{%- if annot.comment %}
- {{annot.comment | nl2br}}
{% endif %}
{% endfor -%}
{% endif -%}
笔记导入
在Obsidian中,
ctrl+P
,- 输入
zotero
,选择刚才配置的my_import
- 弹出Zotero搜索框,输入需要导入的文献标题
- 完成导入
也可以把这个指令绑定成快捷键
效果:
- 文献的基本信息
- 标注的笔记,包括高亮的颜色
- 链接,点击可以跳转到zotero,并打开对应pdf,跳转到笔记所在的位置
图片、不同颜色的高亮、笔记:
最后
说了这么多,关键文献还是得自己看。。而不是搞一些花里胡哨的工具。可能以后会继续这样做笔记,可能还是只用Zotero就可以了。
参考资料
官方文档:obsidian-zotero-integration/Templating.md at main · mgmeyers/obsidian-zotero-integration · GitHub
部分template来自:An Academic Workflow: Zotero & Obsidian | by Alexandra Phelan | Medium
插件安装使用步骤视频:Zotero Obsidian Integration -