Save web articles to Obsidian knowledge base with auto-generated summaries, tags, and local image storage.
All images in the saved Markdown MUST use relative paths, never absolute URLs.
The script handles this automatically. If you process articles manually (e.g., due to anti-scraping), you must:
ATTACHMENTS_DIR/{article_hash}/../attachments/{article_hash}/{filename}This ensures Obsidian can display images offline and iCloud sync works correctly.
# Single article
python3 save_article_to_obsidian.py "https://mp.weixin.qq.com/s/xxx"
# Multiple articles
python3 save_article_to_obsidian.py \
"https://mp.weixin.qq.com/s/xxx" \
"https://zhuanlan.zhihu.com/p/yyy"
# With notes
python3 save_article_to_obsidian.py "https://..." "My notes here"
---
title: "Article Title"
url: "https://..."
created: 2026-04-07
source: wechat
tags:
- ai
- security
- tutorial
---
## 📌 Summary
**Core Idea**: Article summary...
**Key Points**:
- Point 1
- Point 2
- Point 3
**Audience**: Target readers
🔗 [Read Original](https://...)
---
Article content...
```python
OBSIDIAN_DIR = os.path.expanduser("~/Documents/Obsidian/Articles")
ATTACHMENTS_DIR = os.path.expanduser("~/Documents/Obsidian/attachments")
```
MIT
共 2 个版本