# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Repository Overview This is an Obsidian vault containing Sandip Bhattacharya's public notes and blog, designed for publication via Obsidian Publish. The repository contains markdown-based content organized in a knowledge base structure with interconnected notes and blog posts. ## Content Structure - **Posts/**: Blog posts organized by year (e.g., `Posts/2025/`) with date-prefixed filenames - **Tech/**: Technical notes and documentation on various topics - **Excalidraw/**: Drawing files for diagrams and sketches - **scripts/**: Python utilities for RSS generation and content processing - **zzz_templates/**: Template files for new content creation ## Common Development Commands ### Python Environment Management ```bash # Install dependencies using uv (preferred) uv sync # Install dependencies using pip pip install -r scripts/requirements.txt ``` ### RSS Feed Generation The repository includes a custom RSS generator for blog posts: ```bash # Generate RSS feed from blog posts in Posts/ directory python scripts/rss_generator.py -d Posts -o rss.xml # Generate with custom settings python scripts/rss_generator.py -d Posts -n 20 -u https://notes.sandipb.net -o rss.xml # View help for all options python scripts/rss_generator.py --help ``` ### CSS Theme Management (Task) ```bash # Build CSS bundle for Obsidian Publish (default task) task buildcss # Download theme files task download-theme # Clean CSS files task cleancss ``` The CSS build system downloads the Obsidian minimal publish theme and bundles it with custom snippets. ## File Naming Conventions - **Blog posts**: Use format `YYYY-MM-DD Title.md` in Posts/YYYY/ directories - **Tech notes**: Descriptive names, may include MOC (Map of Content) suffix - **Templates**: Stored in zzz_templates/ for easy access at bottom of file list ## Content Format ### Blog Posts Blog posts use YAML frontmatter and follow this structure: ```markdown --- created: YYYY-MM-DD HH:MM description: Optional summary text --- # [[Link|Post Title]] or # Post Title _Posted: YYYY-MM-DD_ | #tags | [[Blog | Blog Index]] Content goes here... ``` ### Tech Notes Tech notes use Obsidian's wiki-style linking: ```markdown # Topic Name Content with [[Internal Links]] and references to other notes. ``` ## RSS Generator Architecture The RSS generator (`scripts/rss_generator.py`) is built with two main classes: - **BlogPost**: Parses individual markdown files, extracts metadata, converts to HTML - **RSSGenerator**: Discovers posts, generates standards-compliant RSS 2.0 XML Key features: - Intelligent date parsing from multiple sources (frontmatter, filename, content) - Smart title extraction from headings and Obsidian links - Automatic summary generation from content or metadata - Robust error handling for malformed files ## Dependencies **Python Dependencies** (managed via uv/pip): - PyYAML >= 6.0: YAML frontmatter parsing - Markdown >= 3.4: HTML conversion with extensions **External Tools**: - Task (taskfile.dev): Build automation - wget: Theme file downloading ## Publishing Workflow This vault is designed for Obsidian Publish but includes local tooling: 1. Content is created as markdown files with appropriate frontmatter 2. CSS themes are bundled using Task for consistent styling 3. RSS feeds are generated programmatically for syndication 4. Content can be published via Obsidian Publish or static site generators ## Important Notes - The repository uses `20_Blog` as the default blog directory in RSS generator (configurable via -d flag) - CSS bundling downloads themes from kepano/obsidian-minimal-publish repository - All blog posts should include proper YAML frontmatter for RSS generation - File modification times are used as fallback dates if other date sources fail