```dataviewjs
const isNotArchived = (path) => !path.includes("Archive");
const getParentAndFileName = (path) => {
const parts = path.split("/");
const fileName = parts.pop().replace(/\.md$/, '');
const parentFolder = parts.pop() || "";
return `${parentFolder}/${fileName}`;
};
const claudeResults = dv.pages(`"Claude"`).file.tasks
.filter(task => isNotArchived(task.path));
const journalResults = [];
/*
const journalResults = dv.pages(`"Journal"`).file.tasks
.filter(task => task.text.toLowerCase().includes("claude") && isNotArchived(task.path));
*/
const tasks = [...claudeResults, ...journalResults];
const incompleteTasks = tasks.filter(task => !task.completed);
const totalTasks = tasks.length;
const incompleteCount = incompleteTasks.length;
const progressPercentage = ((totalTasks - incompleteCount) / totalTasks) * 100;
const progressBar = `
<div style="background-color: lightgray; border-radius: 8px; padding: 2px;">
<div style="width: ${progressPercentage}%; background-color: purple; text-align: center; color: white; border-radius: 5px;">
${progressPercentage.toFixed(0)}%
</div>
</div>
`;
dv.paragraph(progressBar);
dv.paragraph(`<div style="text-align: right;">Total Tasks: ${totalTasks}, Incomplete: ${incompleteCount}</div>`);
const groupedTasks = incompleteTasks.reduce((acc, task) => {
const notePath = task.link.path;
if (!acc[notePath]) {
acc[notePath] = {
tasks: [],
ctime: dv.page(notePath).file.ctime
};
}
acc[notePath].tasks.push(task);
return acc;
}, {});
const sortedNotes = Object.entries(groupedTasks)
.sort((a, b) => b[1].ctime - a[1].ctime);
for (const [notePath, noteData] of sortedNotes) {
const displayPath = getParentAndFileName(notePath);
const file = dv.page(notePath);
const ctime = file.file.ctime;
const formattedCtime = ctime ? ctime.toFormat("yyyy-MM-dd") : "No date";
dv.header(4, `${dv.fileLink(notePath, false, displayPath)} **${formattedCtime}**`);
dv.taskList(noteData.tasks, false);
}
```
# Claude's Task Notes
```dataview
TABLE dateformat(file.ctime, "yyyy-MM-dd") as Created, Objective
FROM "Claude/Tasks"
WHERE Objective
SORT file.ctime DESC
```