{"id":49070090,"url":"https://github.com/chen3feng/vibe-writing","last_synced_at":"2026-04-20T07:04:08.101Z","repository":{"id":351747820,"uuid":"1212287569","full_name":"chen3feng/vibe-writing","owner":"chen3feng","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-16T11:00:53.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T11:16:37.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chen3feng.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T08:24:59.000Z","updated_at":"2026-04-16T11:00:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chen3feng/vibe-writing","commit_stats":null,"previous_names":["chen3feng/vibe-writing"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chen3feng/vibe-writing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen3feng%2Fvibe-writing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen3feng%2Fvibe-writing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen3feng%2Fvibe-writing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen3feng%2Fvibe-writing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chen3feng","download_url":"https://codeload.github.com/chen3feng/vibe-writing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen3feng%2Fvibe-writing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-20T07:04:03.502Z","updated_at":"2026-04-20T07:04:08.087Z","avatar_url":"https://github.com/chen3feng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](README.md) | 中文\n\n# vibe-writing\n\n面向 AI 辅助写作的 Python 工具库 —— 抓取、解析、转换网页内容为文章素材。\n\n\u003e *\"Vibe writing\"（氛围写作）*：你描述想写什么，AI 收集素材并起草，你审阅和润色。\n\n## 功能特性\n\n- 🔍 **统一聊天抓取器** —— 一个 `fetch()` 调用搞定 Gemini、ChatGPT 等平台，自动识别 URL。\n- 📝 **多种输出格式** —— 导出为 Markdown 文本或 JSON，方便下游 AI 处理。\n- 🛠️ **命令行 + 库** —— 支持命令行使用，也可在脚本或 AI Agent 中导入调用。\n- 🤖 **MCP 服务** —— 通过 [Model Context Protocol](https://modelcontextprotocol.io/) 暴露工具，AI 助手可直接调用。\n- 📋 **AI Skill** —— 包含 [`SKILL.md`](SKILL.md) 描述文件，AI 助手可自动发现和使用工具。\n\n## 支持的平台\n\n| 平台 | URL 格式 | 状态 |\n|------|----------|------|\n| Gemini | `gemini.google.com/share/...` / `g.co/gemini/share/...` | ✅ |\n| ChatGPT | `chatgpt.com/share/...` / `chat.openai.com/share/...` | ✅ |\n| 豆包 (Doubao) | `www.doubao.com/thread/...` | ✅ |\n\n## 快速开始\n\n```bash\n# 用 uv 安装依赖\nuv sync\n\n# 安装浏览器（仅首次需要）\nuv run python -m playwright install chromium\n\n# 抓取任意 AI 聊天分享链接（自动识别平台）\nuv run vibe-fetch https://chatgpt.com/share/xxx -o output.txt\nuv run vibe-fetch https://gemini.google.com/share/xxx -o output.txt\n\n# 输出为 JSON\nuv run vibe-fetch https://chatgpt.com/share/xxx -f json -o output.json\n```\n\n## 作为库使用\n\n```python\nfrom vibe_writing import fetch, format_as_text\n\n# 一个调用搞定 —— 自动识别 Gemini、ChatGPT 等\nturns = fetch(\"https://chatgpt.com/share/xxx\")\nprint(format_as_text(turns))\n\n# Gemini 也一样\nturns = fetch(\"https://gemini.google.com/share/xxx\")\n\n# 查看支持的平台\nfrom vibe_writing import supported_platforms\nprint(supported_platforms())\n```\n\n### 进阶：使用平台特定的解析器\n\n```python\nfrom vibe_writing import fetch_rendered_html, parse_gemini_html, parse_chatgpt_html, parse_doubao_html\n\nhtml = fetch_rendered_html(url, wait_seconds=10)\nturns = parse_gemini_html(html)   # 或 parse_chatgpt_html(html) / parse_doubao_html(html)\n```\n\n## 命令行参考\n\n```\nvibe-fetch \u003curl\u003e [选项]\n\n选项：\n  -o, --output FILE        输出文件路径（默认：标准输出）\n  -f, --format {text,json} 输出格式（默认：text）\n  --wait SECONDS           等待 JS 渲染的秒数（默认：8）\n  --save-html FILE         同时保存渲染后的 HTML（用于调试/缓存）\n```\n\n## MCP 服务\n\nvibe-writing 通过 [MCP（Model Context Protocol）](https://modelcontextprotocol.io/) 暴露工具，\nAI 助手（Cursor、Claude Desktop 等）可以直接调用。\n\n### 启动服务\n\n```bash\nuv run vibe-mcp\n```\n\n### 在 IDE 中配置\n\n添加到 `.cursor/mcp.json`（或等效配置）：\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-writing\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"/path/to/vibe-writing\", \"vibe-mcp\"]\n    }\n  }\n}\n```\n\n### 可用的 MCP 工具\n\n| 工具 | 说明 |\n|------|------|\n| `fetch_chat(url, format?, wait?)` | 抓取 AI 聊天分享链接的对话内容 |\n| `list_platforms()` | 列出支持的平台和 URL 格式 |\n\n详见 [`SKILL.md`](SKILL.md)。\n\n## 项目结构\n\n```\n├── src/vibe_writing/\n│   ├── __init__.py          # 公开 API 导出\n│   ├── fetch.py             # 统一入口：自动识别 \u0026 分发\n│   ├── fetch_gemini.py      # Gemini 对话抓取与解析\n│   ├── fetch_chatgpt.py     # ChatGPT 对话抓取与解析\n│   ├── fetch_doubao.py      # 豆包对话抓取与解析\n│   ├── mcp_server.py        # MCP 服务 —— AI 助手集成\n│   ├── _browser.py          # 共享的无头浏览器工具\n│   ├── _format.py           # 共享的格式化工具\n│   └── py.typed             # PEP 561 类型标记\n├── SKILL.md                 # AI Skill 描述文件\n├── articles/                # 生成的文章\n├── data/                    # 缓存的原始数据\n├── pyproject.toml           # 项目配置（uv / hatch）\n├── README.md                # English docs\n└── README-zh.md             # 中文文档\n```\n\n## 开发\n\n```bash\nuv sync\nuv run ruff check src/\nuv run pytest\n```\n\n## 许可证\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen3feng%2Fvibe-writing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchen3feng%2Fvibe-writing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen3feng%2Fvibe-writing/lists"}