Dataview query

This commit is contained in:
Simon Cambier 2024-06-23 10:24:35 +02:00
parent 495c113792
commit 6e34b94cf8

12
dataview-query.js Normal file
View File

@ -0,0 +1,12 @@
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
(async () => {
const pages = [...dv.pages('"bookmarks"')]
.filter(p => p.file.name !== dv.current().file.name)
.sort((a,b) => new Date(b['mastodon-published']) - new Date(a['mastodon-published']))
for (const page of pages) {
console.log(page)
dv.span(`![[${page.file.path}]]`)
dv.span('<br><hr><br>')
await wait(1)
}
})()