dv.table(["Status", "Task", "Link",], dv.pages().file.tasks
.where(t => {
console.log("today:")
console.log(dv.date('today'))
const isScheduled = t.scheduled <= dv.date('today')
const isDue = t.due <= dv.date('today')
const highPriorityString = "⏫"
const isHighPriority = t.text.includes(highPriorityString)
return !t.completed && (t.status == '/' || t.status == '!' || isScheduled || isDue || isHighPriority ) }
)
.sort(t => t.status, "desc")
//.map(t => [t.status, `[${t.text}](${t.link})`,])
.map(t => [t.status, t.text, dv.blockLink(t.link.path, t.link.subpath)])
)
const tasks = dv.pages().file.tasks
.where(t => {
const filename = dv.current().file.name
const completionDate = t?.completion?.c
const filenameArray = filename.split("-")
const dateFromFilenameArray = filenameArray.map(Number)
const dateArray = [completionDate?.year, completionDate?.month, completionDate?.day]
const isCompletedToday = () => dateFromFilenameArray.toString() == dateArray.toString()
return isCompletedToday()
// exclude completed tasks and ones without in progress or important
});
if(tasks.length === 0) {
dv.el("b", "Nothing yet")
} else {
dv.taskList(tasks, false);
}
dv.table(["Date", "Task", "Status"], dv.pages().file.tasks.
where(t => {
return !t.completed // exclude completed tasks
;
})
.sort(t => dv.fileLink(t.path), 'desc')
.map(t => [dv.blockLink(t.link.path, t.link.subpath), t.text, t.status]))