Replies: 4 comments 7 replies
-
书比较多,遍历会导致速度太慢,该如何增加范围啊,比如仅显示阅读进度在某个区间的书籍? |
Beta Was this translation helpful? Give feedback.
4 replies
-
在 eachfile['lastreaddate'] = bookInfo.lastReadDate 然后修改最终输出格式 //按年份输出阅读卡片
for (let y in read_years_months) {
if( y == '2024'){
dv.paragraph('## ' + y + '年');
for (let m of read_years_months[y].sort()) {
dv.paragraph('### ' + parseInt(m).toString() + '月');
dv.table(
['封面', '信息'],
weReadFiles
.sort(b => b.lastreaddate,'desc') // [,'desc']表示逆序,需要顺序去除即可
.map(b => {
console.log(b)
if (b && b.year && y === b.year && b.month && m === b.month) {
return [b.cover, b.info];
}
return null; // 如果不匹配,返回 null
})
.filter(item => item !== null) // 过滤掉不匹配的项
);
}
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
-
代码我重构了一下,现在应该会比之前性能要好一点而且可以自定义显示年度,你重新拉取一下dataviewjs代码 |
Beta Was this translation helpful? Give feedback.
0 replies
-
更新 2024.12.27笔记数量多于5个时,使用插件Badges会导致渲染时间大幅度增加,因此使用了css对效果进行了重写并优化了代码,相较于之前的2700+ms的渲染时间,现在仅需700+ms。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
基于WeRead插件的ReadingCard完工了,相比于Wiki里面的样式更加美观。
并且可以:
教程地址:obsidian-readingcard-template
Beta Was this translation helpful? Give feedback.
All reactions