hellolinux2021
hellolinux2021

欢迎拍手与交流,个人Channel:https://t.me/hellolinuxLab Sentinel DVPN中文社区管理,技术及使用支持 https://t.me/Sentinel_China 个人主页:https://hellolinux.uk/about

hypothesis同步obsidian

hypothesis註冊及使用

https://hypothes.is/

註冊賬號,了解基本的使用,標籤、分組、私有和公共。

在賬號設置中找到develop,獲取api token,後面再obsidian中需要使用。

obsidian中使用hypothesis插件

保證能正常訪問國際網絡,社區插件中找到hypothesis插件


這裡需要填寫上面的token進行連接,另外配置一下同的文件夾,最好設置成手動同步,在obsidian左側欄會出現一個hypothesis圖標,點擊及進行同步。

對於修改同步模板,參考下面。

主要修改了標籤中的:->::,因為兩個引號在obsidian中會被識別成標籤,後續可以被再處理(dataview)。

插件中的模板

{% if is_new_article %}
# {{title}}
​
## Metadata
{% if author %}- Author: [{{author}}]({{authorUrl}}){% endif %}
- Title: {{title}}
{% if url %}- Reference: {{url}}{% endif %}
- Category: #article
{% endif %}
​
{%- if is_new_article %}
## Page Notes
{% for highlight in page_notes -%}
{{highlight.annotation}}
{%- if highlight.tags | length %}
Tags: {% for tag in highlight.tags -%} #{{tag | replace(" ", "-")+" "}}{%- endfor %}
{% endif %}
{% endfor %}
{%- endif -%}
​
{%- if is_new_article -%}
## Highlights
{% for highlight in highlights -%}
- {{highlight.text}} — [Updated on {{highlight.updated}}]({{highlight.incontext}})
{%- if 'Private' != highlight.group %} — Group: #{{highlight.group | replace(" ", "-")}}{% endif %}
{% if highlight.tags | length %}  - Tags: {% for tag in highlight.tags %} #{{tag | replace(" ", "-")+" "}}{% endfor %}
{% endif -%}
{% if highlight.annotation %}  - Annotation: {{highlight.annotation}}{% endif %}
{% endfor %}
{% endif %}

修改中模板

{% if is_new_article %}
# {{title}}
​
## Metadata
{% if author %}- Author:: [{{author}}]({{authorUrl}}){% endif %}
- Title:: {{title}}
- Created:: {{created}}
{% if url %}- Reference:: {{url}}{% endif %}
- Category:: #source/hypothesis
{% endif %}
​
{%- if is_new_article %}
## Page Notes
{% for highlight in page_notes -%}
{{highlight.annotation}}
{%- if highlight.tags | length %}
Tags: {% for tag in highlight.tags -%} #{{tag | replace(" ", "-")+" "}}{%- endfor %}
{% endif %}
{% endfor %}
{%- endif -%}
​
{%- if is_new_article -%}
## Highlights
{% for highlight in highlights -%}
- {{highlight.text}}
{%- if 'Private' != highlight.group %} — Group: #{{highlight.group | replace(" ", "-")}}{% endif %}
{% if highlight.tags | length %}  - Tags: {% for tag in highlight.tags %} #{{tag | replace(" ", "-")+" "}}{% endfor %}
{% endif -%}
{% if highlight.annotation %}  - Annotation: {{highlight.annotation}}{% endif %}
{% endfor %}
{% endif %}

設置參考

https://momentjs.com/docs/#/displaying/format/

模板參考文檔

博客原文: hypothesis同步obsidian

CC BY-NC-ND 2.0 版權聲明

喜歡我的文章嗎?
別忘了給點支持與讚賞,讓我知道創作的路上有你陪伴。

載入中…

發布評論