ãµã ã¼ãå©ãã£ãã
Room
ãããããããªãã¨Obsidianã¯ä½¿ãã¾ããã ãã¡ã¤ã«å±¥æ´ãã«ã¼ã表示ãããã¼ã ãã¼ã¸ã§ãã Dataviewã®ãã¼ã¸ã§ã³ã0.5.64ã«ãªã£ã¦å¾©æ´»ãã¾ããã
Room.md
以ä¸ã®ã¹ã¯ãªãããè²¼ãã¤ãã¦ãªã¼ãã£ã³ã°ãã¥ã¼ã«ãã¦ãã ããã
>[!example]- Room
>```dataview
> task where !completed group by file.link
>```
```dataviewjs
const FOLDER = "keyword/"
const s = "background:ivory;width:119px;height:112px;border:1px solid #eee;border-top:8px solid gold;text-decoration:none;padding:3px;border-radius:3px;margin:3px;overflow:hidden;float:left;"
const p = dv.el("input")
p.placeholder = "..."
p.style = "font-size:18px;background:whitesmoke;border-radius:3px;"
const btn = dv.el("button","ï¼")
btn.style = "font-size:12px;margin:5px;width:40px;"
const h = dv.el("hr", "")
h.style = "border:0;margin:5px;"
const b = dv.el("div", "")
b.style = "font-size:small;font-weight:bold;height:5000px;"
disp()
p.onkeyup = () => disp()
btn.onclick = () => {
q = encodeURI(p.value)
if(q){
open("obsidian://new?file=" + encodeURI(FOLDER) + q + "&content=%0A```query%0A" + q + "%0A```%0A")
}else{
open("obsidian://new")
}
}
function disp(){
r = new RegExp("("+ p.value +")","i")
const d = dv.array(Object.entries(dv.app.metadataCache.fileCache))
.filter(([x,y]) => r.test(x))
.sort(([x,y]) => y.mtime, "desc")
.limit(200)
.map(([x,y]) => "<a class=internal-link style='" + s + "' href='" + x + "'>" + x.split("/").pop().replace(".md","") + "</a>")
b.innerHTML = d.join("\n")
}
```
ä½¿ãæ¹
ã«ã¼ããã¿ããããã¨ãã®ãã¡ã¤ã«ãéãã¾ãã
æ¤ç´¢æ¬ã«ãã¼ã¯ã¼ããæ¸ããã¨ã§çµãè¾¼ã¿ã§ãã¾ãã æ¤ç´¢æ¬ã®å³ã«ãããï¼ããã¿ããããã¨æ°è¦ãã¡ã¤ã«ä½æã«ãªãã¾ãã
Roomã®ã¿ããã¿ããããã¨æªå®äºã®ã¿ã¹ã¯ããªã¹ãã¢ãããã¾ãã
ã¾ã¨ã
ä¸å®å¿ã