diff --git a/README.md b/README.md index bbd63ff..3d1f1fe 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # beaver-calendar [![AI Slop Inside](https://sladge.net/badge.svg)](https://sladge.net) -Calendar and task list for Obsidian Kanban+Tasks +A calendar and a task list for Obsidian on top of Kanban boards and the Tasks plugin. A sphere is a board file, a project is an h2 inside it; every task keeps living in its board, the plugin only shows them together - by deadline, by sphere, or on a month grid - and lets you drag, edit and close them without opening the board. -Sphere - md-file in Kanban boards directory. Project - h2 inside the file. +![The Calendar tab: a month with tasks by day, the undated ones below](docs/calendar.webp) + +![The List tab: tasks grouped by deadline, the rail with spheres and projects on the left](docs/list.webp) ## Archiving @@ -49,5 +51,5 @@ VAULT=/path/to/vault npm run preview # the vault's theme BOARDS=/path/to/vault/Boards npm run preview # real boards, not fixtures EXTRA_CSS=/path/to/other-plugin/styles.css … # another plugin's css, loaded after ours open 'http://localhost:4173/?groupBy=due&railCollapsed=1#edit-date' # prefs + scene -node preview/shot.mjs out.png 'http://localhost:4173/#date' # screenshot + console +node preview/shot.mjs out.png 'http://localhost:4173/#cal' # screenshot + console ``` diff --git a/docs/calendar.webp b/docs/calendar.webp new file mode 100644 index 0000000..0bdd010 Binary files /dev/null and b/docs/calendar.webp differ diff --git a/docs/list.webp b/docs/list.webp new file mode 100644 index 0000000..2efeef0 Binary files /dev/null and b/docs/list.webp differ diff --git a/preview/entry.ts b/preview/entry.ts index cdc966e..9e34836 100644 --- a/preview/entry.ts +++ b/preview/entry.ts @@ -105,6 +105,17 @@ async function main(): Promise { } if (scene === "rail-none") store.filterNone(); } + // The month grid on its own, opened on the month the fixtures are busiest in. + if (scene === "cal") { + const months = new Map(); + for (const item of store.visible) { + const key = (item.due ?? item.scheduled)?.slice(0, 7); + if (key) months.set(key, (months.get(key) ?? 0) + 1); + } + const busiest = [...months.entries()].sort((a, b) => b[1] - a[1])[0]?.[0]; + store.view = "calendar"; + if (busiest) store.focusDay(`${busiest}-15`); + } if (scene.startsWith("peek")) { if (scene === "peek-cal") store.view = "calendar"; if (scene === "peek-notes") store.showDone = true;