diff options
| author | Adam Malczewski <[email protected]> | 2026-03-29 13:44:05 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-29 13:44:05 +0900 |
| commit | e8d107e454b3804e089a33ce5fe7c931040d4647 (patch) | |
| tree | 4f8787fae670e86515baed54e00087ce3ef28da6 /.rules/plan/calendar-phase-1.md | |
| parent | 67d7d50ee2b05f66de3ab6aea38ff5d7d56ce839 (diff) | |
| download | ai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.tar.gz ai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.zip | |
remove calendar and chat history
Diffstat (limited to '.rules/plan/calendar-phase-1.md')
| -rw-r--r-- | .rules/plan/calendar-phase-1.md | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/.rules/plan/calendar-phase-1.md b/.rules/plan/calendar-phase-1.md deleted file mode 100644 index a1f9b2e..0000000 --- a/.rules/plan/calendar-phase-1.md +++ /dev/null @@ -1,64 +0,0 @@ -# Phase 1: Daily Note Manager (`src/calendar/daily-notes.ts`) - -**Status:** Not started -**Depends on:** Nothing (standalone) -**Output file:** `src/calendar/daily-notes.ts` - ---- - -## Overview - -Core module — no UI, just logic. All daily note path computation, CRUD, indexing, and date detection lives here. - ---- - -## Storage Structure - -``` -{rootFolder}/{YYYY}/{MM}/{DD}/{YYYY-MM-DD}.md -``` - -- **`rootFolder`** — configurable, defaults to `"Calendar"` -- **Year** — 4-digit (`2026`) -- **Month** — 2-digit zero-padded (`01`–`12`) -- **Day** — 2-digit zero-padded (`01`–`31`) -- **Filename** — `YYYY-MM-DD.md` (ISO date) - ---- - -## Functions - -``` -- getDailyNotePath(date: Moment, rootFolder: string): string - Computes: `{rootFolder}/{YYYY}/{MM}/{DD}/{YYYY-MM-DD}.md` - -- getDailyNote(app: App, date: Moment, rootFolder: string): TFile | null - Looks up vault file at the computed path. - -- createDailyNote(app: App, date: Moment, rootFolder: string, template?: string): Promise<TFile> - Creates parent folders if needed, creates the file. - Uses template content if configured, else empty with frontmatter: - --- - date: YYYY-MM-DD - --- - -- openDailyNote(app: App, date: Moment, rootFolder: string, opts: { newLeaf: boolean }): Promise<void> - Opens existing note or creates then opens. - -- indexDailyNotes(app: App, rootFolder: string): Map<string, TFile> - Scans `{rootFolder}/` recursively, parses YYYY/MM/DD structure, - returns Map<"YYYY-MM-DD", TFile>. - -- getDateFromDailyNote(file: TFile, rootFolder: string): Moment | null - Reverse lookup: given a TFile, extract the date if it lives - in the daily note folder structure. -``` - ---- - -## Notes - -- `moment.js` is available globally in Obsidian as `window.moment()`. No import needed. -- `indexDailyNotes()` scans only the calendar root folder, not the entire vault. -- Template support: if `calendarDailyNoteTemplate` is set, new daily notes copy that file's content (with `{{date}}` placeholder replacement). -- The `day/` folder can hold multiple notes per day for future expansion, but the calendar UI currently shows one note per day. |
