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 版权声明

喜欢我的文章吗?
别忘了给点支持与赞赏,让我知道创作的路上有你陪伴。

加载中…

发布评论