An efficient tool to create a comprehensive summary of your Obsidian notes using Deepseek's cost-effective AI model. It helps you quickly review and navigate through your knowledge base by generating a centralized summary with direct links to original notes.
- Smart Summarization: Automatically generates concise 3-sentence summaries for each note using AI
- Knowledge Navigation: Creates direct links to original notes for easy reference
- Progress Tracking: Shows real-time progress with detailed statistics
- Interrupt-Safe: Supports graceful interruption and progress saving with Ctrl+C
- Parallel Processing: Utilizes multi-threading for faster processing
Using Deepseek's AI model is very cost-effective:
- Average cost per note: ~$0.0001-0.0002 (based on token usage)
- Process 1000 notes: ~$0.1-0.2
- Significantly cheaper than other commercial AI models
-
Install
uv
:pip install uv
-
Sync dependencies:
uv sync
-
Configure the .env file with your settings. You can use the provided
env.example
file as a template:cp env.example .env
-
Set up your configuration:
-
Get your Deepseek API key:
- Sign up at https://platform.deepseek.com/
- Go to "API Keys" section
- Create a new API key
- Copy the key to your .env file
-
Find your Obsidian vault path:
- Open Obsidian
- Go to Settings → About
- Look for "Vault path"
- Copy the path to your .env file
- On macOS/Linux: e.g.,
/Users/username/Documents/ObsidianVault
- On Windows: e.g.,
C:\Users\username\Documents\ObsidianVault
-
-
Run the project:
uv run summary.py
Example output:
🦉 Starting to process vault... (Press Ctrl+C to interrupt and save progress) 🚀 Progress: 24/24 (100.0%) | ⏳ Time: 18.3s | 📊 Token: 25788 | 🕒 ETA: 0.0s ✅ Processing complete! Results saved to: /path/to/vault/summary.md 📊 Final Statistics: - Total files: 43 - Files to process: 24 - Successfully processed: 24 - Skipped files: 19 - Total tokens used: 25788 - Total time: 18.3s - Processing speed: 1.3 files/sec - Token rate: 1405.4 tokens/sec
The generated summary file contains:
- A timestamp of generation
- Summaries of all processed notes
- Direct links to original notes using Obsidian's
[[link]]
format
Example:
# Obsidian 文档摘要汇总
> 自动生成于 2024-01-20 15:30
- [[projects/web-dev/react-hooks]]
React Hooks 是 React 16.8 引入的特性,允许在函数组件中使用状态和其他 React 特性。主要包括 useState 和 useEffect 两个基础 Hook。通过 Hooks 可以实现更清晰的代码组织和状态管理。
- [[learning/python/async-await]]
Python 的异步编程模型基于协程实现,通过 async/await 语法提供了简洁的异步编程接口。异步编程适合 I/O 密集型任务,可以显著提高程序性能。
// ... more summaries ...
Currently, basic configuration is supported through environment variables:
DEEPSEEK_API_KEY
: Your Deepseek API keyOBSIDIAN_VAULT
: Path to your Obsidian vaultOUTPUT_FILE
: Name of the output summary file (default: 文档摘要汇总.md)
Advanced configuration options will be supported in future releases:
- Maximum content length for processing
- Summary token limit
- AI generation temperature
- Minimum file size filter
- Custom system prompt
- And more...
Stay tuned for updates! Feel free to contribute if you'd like to help implement these features.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.