Kenshin / simpread

简悦 ( SimpRead ) - 让你瞬间进入沉浸式阅读的扩展
http://ksria.com/simpread
GNU General Public License v3.0
8.08k stars 529 forks source link

与 Obsidian 联动存在的一系列问题 #4612

Closed Xm798 closed 2 years ago

Xm798 commented 2 years ago

版本信息

请描述你的问题

问题1:SimpRead Unreader Sync 插件设置文件夹无效

在插件中设置 Base folder 为 SimpRead-Auto,然后将文章使用 dd 加入稍后读,发现被加入到了 SimpRead 文件夹中。

image image

在阅读模式下进行标注,发现文章也被加入到了 SimpRead 文件夹中。

image

问题2:自动化辅助增强 配置无法生效

https://github.com/Kenshin/simpread/issues/4483#issuecomment-1281769856

问题3:@annote 格式不会更新标注

阅读模式下,更新标注,手动使用快捷键 obuu 更新,提示保存成功,但事实上并没有。

image image

问题4:Ob 模板不生效

---
title: "{{title}}"
alias: 
<% if ( unread.note && unread.title != unread.note ) { %>  - "{{note}}"
<% } %>  - "{{title}}"
created-date: {{create|yyyy-mm-dd'T'HH:MM:sso}}
type: Simpread
<% if (unread.img) { %>banner: "<%- unread.img %> "
banner_icon: 🔖
<% } -%>
tag: {{ |tag| | }}
idx: {{idx}}
---

# {{title}}
<%
let ifURI = "http://localhost:7026/unread/"+unread.idx
%>
> [!example]- [🧷内部链接](<<%= ifURI %>>) [🌐外部链接](<<%= unread.url %>>)    
> URI:: [🧷](<<%= ifURI %>>) [🌐](<<%= unread.url %>>) 
> intURI:: [🧷内部链接](<{{int_uri}}>)

%%
> [!example]+ **Comments**  
> ```dataview
> TABLE 
>     WITHOUT ID
>     link(Source, dateformat(date(Source), "yyyy-MM-dd")) as Date___, 
>     regexreplace(rows.Comments,"^@@\[\[.+?\]\]\s","") as "Comments"
> FROM "journals"
> WHERE  contains(cmnt, this.file.name)
> FLATTEN cmnt as Comments
> WHERE contains(Comments, this.file.name)
> GROUP BY file.link as Source
> SORT rows.file.day desc
> ```
>  **Description**:: {{desc}}
%%

> [!md] Metadata  
> **标题**:: [{{title}}]({{url}})  
> **日期**:: [[{{create|yyyy-mm-dd}}]]  
<% if ( unread.annotations && unread.annotations.length > 0 ) { %>
## Annotations

{{annotations}}
<% } -%>
<% if ( unread.tags && unread.tags.includes('Highlights') ) { %>
![[<%% tp.file.title %>_mentions#Highlight Mentions]]
<% } -%>
<% if ( unread.refs ) { %>
## Reference   
{{-|refs}}  
<% } %> 
---
title: "{{title}}"
alias: 
<% if ( unread.note && unread.title != unread.note ) { %>  - "{{note}}"
<% } %>  - "{{title}}"
created-date: {{create|yyyy-mm-dd'T'HH:MM:sso}}
type: Simpread
<% if (unread.img) { %>banner: "<%- unread.img %> "
banner_icon: 🔖
<% } -%>
tag: {{ |tag| | }}
idx: {{idx}}
---

# {{title}}
<%
let ifURI = "http://localhost:7026/unread/"+unread.idx
%>
> [!example]- [🧷内部链接](<<%= ifURI %>>) [🌐外部链接](<<%= unread.url %>>)    
> URI:: [🧷](<<%= ifURI %>>) [🌐](<<%= unread.url %>>) 
> intURI:: [🧷内部链接](<{{int_uri}}>)

%%
> [!example]+ **Comments**  
> ```dataview
> TABLE 
>     WITHOUT ID
>     link(Source, dateformat(date(Source), "yyyy-MM-dd")) as Date___, 
>     regexreplace(rows.Comments,"^@@\[\[.+?\]\]\s","") as "Comments"
> FROM "journals"
> WHERE  contains(cmnt, this.file.name)
> FLATTEN cmnt as Comments
> WHERE contains(Comments, this.file.name)
> GROUP BY file.link as Source
> SORT rows.file.day desc
> ```
>  **Description**:: {{desc}}
%%

> [!md] Metadata  
> **标题**:: [{{title}}]({{url}})  
> **日期**:: [[{{create|yyyy-mm-dd}}]]  
<% if ( unread.annotations && unread.annotations.length > 0 ) { %>
## Annotations

{{annotations}}
<% } -%>
<% if ( unread.tags && unread.tags.includes('Highlights') ) { %>
![[<%% tp.file.title %>_mentions#Highlight Mentions]]
<% } -%>
<% if ( unread.refs ) { %>
## Reference   
{{-|refs}}  
<% } %> 

加入到库中的实际效果:

image image
Kenshin commented 2 years ago

嗨,你可以先使用 https://github.com/Kenshin/simpread/issues/4483#issuecomment-1281773658 提到的配置包,先确保配置正确。

然后在将 Obsidian 端的内容手动跟你的已存在的库合并。

注意:

  1. 确保只开一个存在 SimpRead Sync 的库(多个 simperad sync 插件会导致端口冲突)
  2. 暂时先只用一级目录
Xm798 commented 2 years ago

就是使用的配置库,刚配置好的时候没问题,今天出现了问题。

Xm798 commented 2 years ago

暂时先只用一级目录

我理解的 SimpRead-Auto 就是一级目录,是我理解有问题吗?是说一级目录是库的根目录?

Kenshin commented 2 years ago

我看了下你的问题,大多都是配置库已经存在的功能,并没有添加新的插件。

所以,有个建议:

  1. 务必先留存好你的目前的数据。(简悦 + Obsidian)
  2. 再按照配置库的方案重新来一次(因为有了第一次的经验,用不了几分钟)
  3. 确保步骤2没问题的话,再按照你的个性化定制设置。(文件夹名称、模板等)

另外,

  1. 你提到的模板需要在两边同时设置。
  2. SimpRead-Auto 就是一级目录,没错。
Kenshin commented 2 years ago

嗨,在这个 Issues 上面讨论吧。

https://user-images.githubusercontent.com/48074861/196334377-915b9105-a4e6-4135-8855-472d905be1ca.mp4

还是先以我刚才说的测试方案为准。

PS:视频我看了,现象确实如你所说。

Xm798 commented 2 years ago

重新配置后确实又可以了,但每次出问题都要重新配置着实是有些麻烦。

暂时先用着,希望不要再出问题了TAT

Kenshin commented 2 years ago

但每次出问题都要重新配置着实是有些麻烦。

当然不需要每次配置 😂... 目前使用这套方案的用户除了你还没有出问题的呢。

再出错的话,留意下出错前你做了什么操作。