Content
# Tool List
## Overview
This project provides a comprehensive tool for summarizing WeChat public account articles. It can fetch articles, generate summaries, and export them in various formats such as HTML, Markdown, and more.
## Features
- Automatically fetch WeChat public account article content
- Intelligent generation of article summaries (simple / Ollama / OpenAI / Anthropic / Zhipu)
- **RAG Enhanced Summary** - Intelligent summary based on vector retrieval, improving long article summary quality
- **GraphRAG Global Summary** - Global understanding based on knowledge graph, suitable for complex long article analysis
- Export as HTML / Markdown (optional: Obsidian / Notion / OneNote)
- Local caching (avoid repeated fetching)
- Modern GUI interface (supporting dark/light themes, MVVM architecture)
- **2026 GUI Design Trend Reconstruction** - Liquid glass effect/micro-interaction animation/accessibility support
- **Knowledge Graph Viewer** - Support GraphRAG visualization, force-directed layout
- Command line tool support
- **MCP Server Support** - Can be directly called by AI Agent (Claude/ChatGPT)
## Architecture
The project adopts **Clean Architecture / Hexagonal** design:
```text
src/wechat_summarizer/
├── domain/ # Domain layer (entities/value objects/domain services)
├── application/ # Application layer (use case orchestration/ports/DTO)
├── infrastructure/ # Infrastructure layer (scraper/summarizer/exporter/config and container)
├── presentation/ # Presentation layer (CLI/GUI)
└── shared/ # Shared tools/constants/exceptions
```
## Quick Start
### Installation
```bash
# Clone the project
cd Newidea-warp
# Install dependencies
pip install -e .
# Optional: enable AI summary (OpenAI / Anthropic, etc.)
pip install -e .[ai]
# Optional: enable Playwright rendering crawl
pip install -e .[playwright]
playwright install chromium
# Optional: enable RAG enhanced summary
pip install -e .[rag]
# Optional: enable GraphRAG global summary (knowledge graph)
pip install -e .[graphrag]
```
### Usage
#### GUI Mode (default)
```bash
python -m wechat_summarizer
```
#### CLI Mode
```bash
# Help
wechat-summarizer --help
# Fetch + (optional) summary + (optional) export
wechat-summarizer fetch "https://mp.weixin.qq.com/s/xxx" -m simple -e html
wechat-summarizer fetch "https://mp.weixin.qq.com/s/xxx" -m openai -e markdown -o output.md
# Export to Obsidian Vault (need to configure export.obsidian_vault_path)
wechat-summarizer fetch "https://mp.weixin.qq.com/s/xxx" -m simple -e obsidian
# Export to Notion (need to configure export.notion_api_key / export.notion_database_id)
wechat-summarizer fetch "https://mp.weixin.qq.com/s/xxx" -m simple -e notion
# Export to OneNote (need to authorize; and configure export.onenote_*)
wechat-summarizer onenote-auth
wechat-summarizer fetch "https://mp.weixin.qq.com/s/xxx" -m simple -e onenote
```
## Configuration
Create a `.env` file to configure environment variables:
```env
# OpenAI (optional, for AI summary)
WECHAT_SUMMARIZER_OPENAI__API_KEY=sk-xxx
WECHAT_SUMMARIZER_OPENAI__BASE_URL=https://api.openai.com/v1
WECHAT_SUMMARIZER_OPENAI__MODEL=gpt-4o-mini
# Anthropic (optional)
WECHAT_SUMMARIZER_ANTHROPIC__API_KEY=sk-ant-xxx
WECHAT_SUMMARIZER_ANTHROPIC__MODEL=claude-3-haiku-20240307
# Zhipu (optional)
WECHAT_SUMMARIZER_ZHIPU__API_KEY=xxx
WECHAT_SUMMARIZER_ZHIPU__MODEL=glm-4-flash
# Export
WECHAT_SUMMARIZER_EXPORT__DEFAULT_OUTPUT_DIR=./output
WECHAT_SUMMARIZER_EXPORT__OBSIDIAN_VAULT_PATH=/path/to/your/vault
WECHAT_SUMMARIZER_EXPORT__NOTION_API_KEY=secret_xxx
WECHAT_SUMMARIZER_EXPORT__NOTION_DATABASE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# OneNote (Microsoft Graph)
# Note: Notebook must exist; Section will be created automatically if not exist.
# First use requires: wechat-summarizer onenote-auth
WECHAT_SUMMARIZER_EXPORT__ONENOTE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WECHAT_SUMMARIZER_EXPORT__ONENOTE_TENANT=common
WECHAT_SUMMARIZER_EXPORT__ONENOTE_NOTEBOOK=MyNotebook
WECHAT_SUMMARIZER_EXPORT__ONENOTE_SECTION=WeChat Summaries
```
## Dependencies
- Python 3.10+
- httpx - HTTP client
- beautifulsoup4 - HTML parsing
- customtkinter - Modern GUI
- click - CLI framework
- pydantic-settings - Configuration management
- loguru - Logging
- psutil - Performance monitoring
## Documentation
### Getting Started
- **[Getting Started](./docs/GETTING_STARTED.md)** - Start from scratch, hand-by-hand guide
- **[Documentation Navigation](./docs/README.md)** - Full navigation of docs directory
### Development Documentation
- **[AGENTS.md](./AGENTS.md)** - AI coding assistant guide
- [docs/README.md](./docs/README.md) - Documentation navigation
- [docs/MIGRATION_INDEX.md](./docs/MIGRATION_INDEX.md) - Documentation migration index
- [docs/PROJECT_STRUCTURE.md](./docs/PROJECT_STRUCTURE.md) - Project directory boundary agreement
- [docs/ITERATION_ROADMAP.md](./docs/ITERATION_ROADMAP.md) - Iteration improvement roadmap
- [docs/plans/IMPROVEMENT_PLAN.md](./docs/plans/IMPROVEMENT_PLAN.md) - Project improvement development plan
## Latest Release (v2.4.3)
### English Release Notes
- Security hardening: added pre-request DNS resolution and safety checks in scraper paths to improve DNS rebinding / SSRF protection.
- Test enhancement: added DNS rebinding integration tests and completed targeted regression runs for security-critical modules.
- Reliability improvements: fixed structured logging event processing and context-binding type consistency.
- Release sync: bumped project version to `2.4.3` and aligned packaging defaults (including MSIX version).
## License
MIT License