zhaohongxuan / obsidian-weread-plugin

Obsidian Weread Plugin is a plugin to sync Weread(微信读书) hightlights and annotations into your Obsidian Vault.
MIT License
1.21k stars 62 forks source link

求教:请问有无办法能使高亮笔记和划线评论不分散在两个模块里,完全按照正文中的位置顺序排列在一起? #174

Open DanShui-Yu opened 1 year ago

copofe commented 1 year ago

+1,看了下接口,chapterUid应该可以作为章节索引,range是划线文字的索引范围,依靠这两个字段应该可以合并高亮和划线笔记,并按顺序排列

calmwaves111 commented 1 year ago

+1,同求这个功能

zhaohongxuan commented 1 year ago

+1,同求这个功能

现在就是支持的,改一下默认的模板就行,下面的模板可以试试

---
isbn: {{metaData.isbn}}
category: {{metaData.category}}
lastReadDate: {{metaData.lastReadDate}}
---
# 元数据
> [!abstract] {{metaData.title}}
> - ![ {{metaData.title}}|200]({{metaData.cover}})
> - 书名: {{metaData.title}}
> - 作者: {{metaData.author}}
> - 简介: {{metaData.intro}}
> - 出版时间 {{metaData.publishTime}}
> - ISBN: {{metaData.isbn}}
> - 分类: {{metaData.category}}
> - 出版社: {{metaData.publisher}}

# 高亮划线
{% for chapter in chapterHighlights %}
## {{chapter.chapterTitle}}
{% for highlight in chapter.highlights %}
{% if highlight.reviewContent %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- 💭 {{highlight.reviewContent}} - ⏱ {{highlight.createTime}} {% else %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- ⏱ {{highlight.createTime}}{% endif %} {% endfor %}{% endfor %}
# 读书笔记
{% for chapter in bookReview.chapterReviews %}{% if chapter.reviews or chapter.chapterReview %}
## {{chapter.chapterTitle}}
{% if  chapter.chapterReviews %}{% for chapterReview in chapter.chapterReviews %}
### 章节评论 No.{{loop.index}}
- {{chapterReview.content}} ^{{chapterReview.reviewId}}
    - ⏱ {{chapterReview.createTime}} {% endfor%}{%endif %}{% if chapter.reviews %}{%for review in chapter.reviews %}
# 本书评论
{% if bookReview.bookReviews %}{% for bookReview in bookReview.bookReviews %}
## 书评 No.{{loop.index}} 
{{bookReview.mdContent}} ^{{bookReview.reviewId}}
⏱ {{bookReview.createTime}}
{% endfor%}{% endif %}
DanShui-Yu commented 1 year ago

+1,同求这个功能

现在就是支持的,改一下默认的模板就行,下面的模板可以试试

---
isbn: {{metaData.isbn}}
category: {{metaData.category}}
lastReadDate: {{metaData.lastReadDate}}
---
# 元数据
> [!abstract] {{metaData.title}}
> - ![ {{metaData.title}}|200]({{metaData.cover}})
> - 书名: {{metaData.title}}
> - 作者: {{metaData.author}}
> - 简介: {{metaData.intro}}
> - 出版时间 {{metaData.publishTime}}
> - ISBN: {{metaData.isbn}}
> - 分类: {{metaData.category}}
> - 出版社: {{metaData.publisher}}

# 高亮划线
{% for chapter in chapterHighlights %}
## {{chapter.chapterTitle}}
{% for highlight in chapter.highlights %}
{% if highlight.reviewContent %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- 💭 {{highlight.reviewContent}} - ⏱ {{highlight.createTime}} {% else %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- ⏱ {{highlight.createTime}}{% endif %} {% endfor %}{% endfor %}
# 读书笔记
{% for chapter in bookReview.chapterReviews %}{% if chapter.reviews or chapter.chapterReview %}
## {{chapter.chapterTitle}}
{% if  chapter.chapterReviews %}{% for chapterReview in chapter.chapterReviews %}
### 章节评论 No.{{loop.index}}
- {{chapterReview.content}} ^{{chapterReview.reviewId}}
    - ⏱ {{chapterReview.createTime}} {% endfor%}{%endif %}{% if chapter.reviews %}{%for review in chapter.reviews %}
# 本书评论
{% if bookReview.bookReviews %}{% for bookReview in bookReview.bookReviews %}
## 书评 No.{{loop.index}} 
{{bookReview.mdContent}} ^{{bookReview.reviewId}}
⏱ {{bookReview.createTime}}
{% endfor%}{% endif %}

复制进去显示红框不能保存呢

calmwaves111 commented 1 year ago

+1,同求这个功能

现在就是支持的,改一下默认的模板就行,下面的模板可以试试

---
isbn: {{metaData.isbn}}
category: {{metaData.category}}
lastReadDate: {{metaData.lastReadDate}}
---
# 元数据
> [!abstract] {{metaData.title}}
> - ![ {{metaData.title}}|200]({{metaData.cover}})
> - 书名: {{metaData.title}}
> - 作者: {{metaData.author}}
> - 简介: {{metaData.intro}}
> - 出版时间 {{metaData.publishTime}}
> - ISBN: {{metaData.isbn}}
> - 分类: {{metaData.category}}
> - 出版社: {{metaData.publisher}}

# 高亮划线
{% for chapter in chapterHighlights %}
## {{chapter.chapterTitle}}
{% for highlight in chapter.highlights %}
{% if highlight.reviewContent %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- 💭 {{highlight.reviewContent}} - ⏱ {{highlight.createTime}} {% else %}
> 📌 {{ highlight.markText |trim }} ^{{highlight.bookmarkId}}
- ⏱ {{highlight.createTime}}{% endif %} {% endfor %}{% endfor %}
# 读书笔记
{% for chapter in bookReview.chapterReviews %}{% if chapter.reviews or chapter.chapterReview %}
## {{chapter.chapterTitle}}
{% if  chapter.chapterReviews %}{% for chapterReview in chapter.chapterReviews %}
### 章节评论 No.{{loop.index}}
- {{chapterReview.content}} ^{{chapterReview.reviewId}}
    - ⏱ {{chapterReview.createTime}} {% endfor%}{%endif %}{% if chapter.reviews %}{%for review in chapter.reviews %}
# 本书评论
{% if bookReview.bookReviews %}{% for bookReview in bookReview.bookReviews %}
## 书评 No.{{loop.index}} 
{{bookReview.mdContent}} ^{{bookReview.reviewId}}
⏱ {{bookReview.createTime}}
{% endfor%}{% endif %}

这个复制进插件设置里面,是红框,应该有些问题

1551255004 commented 9 months ago

同样遇到红框问题~~~

1551255004 commented 9 months ago

这个需求挺多的,希望后边可以有吧。

chiying2015 commented 9 months ago

应该有大佬发过模板可以用的

DanShui-Yu commented 9 months ago

@chiying2015 求链接

chiying2015 commented 9 months ago

@chiying2015 求链接

https://github.com/zhaohongxuan/obsidian-weread-plugin/discussions/62#discussioncomment-7236718

DBAAG大佬的模板可以

chiying2015 commented 9 months ago

@chiying2015 求链接

#62 (comment)

DBAAG大佬的模板可以

对不起,是DBAAJ

DanShui-Yu commented 8 months ago

感谢各位大佬提供的思路,已解决,自答一下,有同样需求的旁友们可以去隔壁看看https://github.com/zhaohongxuan/obsidian-weread-plugin/discussions/62#discussioncomment-7877463

@zhaohongxuan 这个问题可以close了大神

Sleepleeps commented 7 months ago

我做了一个模板,高亮、评论(包括没高亮划线的)按照章节顺序、原文顺序排列的模板 演示图