(daily_note: Path)
| 2603 | |
| 2604 | def _sync_obsidian_toc(daily_note: Path) -> None: |
| 2605 | year_dir = daily_note.parent |
| 2606 | match = re.fullmatch(r"Daily Note - ([A-Za-z]+) (20\d{2})\.md", daily_note.name) |
| 2607 | if not match: |
| 2608 | return |
| 2609 | month_label, year = match.groups() |
| 2610 | toc = year_dir / f"Table of Content - {year}.md" |
| 2611 | link_name = daily_note.stem |
| 2612 | entry = f"# {link_name}\n[[{link_name}]]" |
| 2613 | current = toc.read_text(encoding="utf-8") if toc.exists() else "" |
| 2614 | if f"[[{link_name}]]" in current: |
| 2615 | return |
| 2616 | toc.write_text(current.rstrip() + ("\n" if current.strip() else "") + entry + "\n", encoding="utf-8") |
| 2617 | |
| 2618 | |
| 2619 | def _save_reading_report_markdown( |
| 2620 | *, |
no outgoing calls
no test coverage detected