obsidian社区插件
Dataview 实战 - 将一周的元数据显示为 emojis(习惯跟踪)
插件ID:dataview%E5%AE%9E%E6%88%98-%E5%B0%86%E4%B8%80%E5%91%A8%E7%9A%84%E5%85%83%E6%95%B0%E6%8D%AE%E6%98%BE%E7%A4%BA%E4%B8%BAemojis%E4%B9%A0%E6%83%AF%E8%B7%9F%E8%B8%AA
dataview%E5%AE%9E%E6%88%98-%E5%B0%86%E4%B8%80%E5%91%A8%E7%9A%84%E5%85%83%E6%95%B0%E6%8D%AE%E6%98%BE%E7%A4%BA%E4%B8%BAemojis%E4%B9%A0%E6%83%AF%E8%B7%9F%E8%B8%AA
dataview%E5%AE%9E%E6%88%98 %E5%B0%86%E4%B8%80%E5%91%A8%E7%9A%84%E5%85%83%E6%95%B0%E6%8D%AE%E6%98%BE%E7%A4%BA%E4%B8%BAemojis%E4%B9%A0%E6%83%AF%E8%B7%9F%E8%B8%AA:将一周的元数据显示为emjois(习惯跟踪)
Dataview 实战 - 将一周的元数据显示为 emojis(习惯跟踪)
利用 dataview 提供的 choice 函数,我们可以把输出值修改为 emoji,使得表格更加直观,下面给了两种使用示例,可以参考这两段代码的使用方式以及结果构建属于自己的 dataview 查询语句。
```dataview
TABLE
choice(praying, "💚", "➖") AS Praying,
choice(breathing, "💚", "➖") AS breathing,
choice(beingthankful, "💚", "➖") AS "being thankful",
choice(slowdown, "💚", "➖") AS "slow down"
FROM "10 Example Data/dailys"
WHERE wellbeing.mood > 0 AND date(file.day).weekyear = 2
```
```dataview
TABLE
choice(wellbeing.mood = 1, "😢",
choice(wellbeing.mood = 2 or wellbeing.mood = 3, "😐",
choice(wellbeing.mood > 3, "😃", ""))) as Mood,
choice(praying, "💚", "➖") AS Praying,
choice(breathing, "💚", "➖") AS breating,
choice(beingthankful, "💚", "➖") AS "being thankful",
choice(slowdown, "💚", "➖") AS "slow down"
FROM "10 Example Data/dailys"
WHERE wellbeing.mood > 0 AND date(file.day).weekyear = 2
```
讨论
若阁下有独到的见解或新颖的想法,诚邀您在文章下方留言,与大家共同探讨。
反馈交流
其他渠道
版权声明
版权声明:所有 PKMer 文章如果需要转载,请附上原文出处链接。