施工日记采用obsidian记录,使用苹果icloud同步实在太方便了
模版一键创建,自动带出天气、日期、昨日的计划。
创建模版:
---
日期: <% tp.date.now("YYYY-MM-DD") %>
周: <% tp.date.now("ww") %>
<%*
const key = "自己修改";
const host = "p64wcwwnf8.re.qweatherapi.com";
const locationId = "101160601";
let weatherText = "天气获取失败";
try {
const res = await tp.obsidian.requestUrl({
url: `https://${host}/v7/weather/now?location=${locationId}&key=${key}`
})
const json = JSON.parse(res.text);
weatherText = `${json.now.text} ${json.now.temp}℃`;
} catch(e) {}
-%>
天气: <% weatherText %>
---
# 施工内容:
-
-
-
# 明日计划:
-
-
-
# 需要解决的问题:
-
-
-
# 昨日计划:
```dataview
TABLE 明日计划 AS "昨日延续计划"
FROM "施工日志"
WHERE 日期 = this.日期 - dur(1 day)

浙公网安备 33010602011771号