AI-powered web page summarization using Claude API via Python subprocess.
Analyzes web links to generate personalized summaries and downloads representative images for DreamNodes. Uses Python to work around Obsidian plugin environment restrictions on third-party Node.js packages.
web-link-analyzer/
├── services/
│ └── web-link-analyzer-service.ts # Main service (spawns Python, manages analysis)
├── scripts/
│ ├── venv/ # Python virtual environment
│ ├── analyze-web-link.py # Python script for web analysis
│ ├── requirements.txt # Python dependencies
│ └── setup.sh # venv setup script
├── index.ts # Barrel export
└── README.md # This file
Services:
webLinkAnalyzerService- Singleton service instance for analyzing web links
- analyzeWebLink() - Main entry point: spawns Python process with URL, API key, and user profile path
- initialize() - Sets vault and plugin paths for resolving script locations
- isSetupComplete() - Checks if Python venv exists at expected location
- stop() - Kills running analysis process
Similar to realtime-transcription feature - uses Python subprocess to avoid Node.js package restrictions in Obsidian plugins.
Process Flow:
- Service spawns Python script with URL and API key
- Python script fetches web page content
- Claude API analyzes content and generates summary
- Representative image is downloaded
- README.md and .udd file are updated in DreamNode repository
- Service updates node title in store and triggers media reload
- Python 3.9+ with virtual environment at
scripts/venv/ - Python script at
scripts/analyze-web-link.py - User profile at
~/.claude/CLAUDE.mdfor personalization - Anthropic API key from plugin settings
- Used by:
dreamnode/git-dreamnode-servicefor enriching nodes created from web URLs - Used by:
drag-and-dropfeature indirectly through git-dreamnode-service - Initialized by: Plugin main.ts during startup