dsh-wechat-collector
安全与治理 活跃维护

dsh-wechat-collector

bescriptkiddie/dsh-wechat-collector

轻量级微信公众号内容采集工具,原生适配对应内容生态,可自动抓取目标账号文章与元数据,直接对接ContentStudio完成内容交接,无需额外配置,开箱即用,采集到分发的流程顺滑高效。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Python
主要语言
MIT
开源协议
664 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:bescriptkiddie/dsh-wechat-collector
git clone https://github.com/bescriptkiddie/dsh-wechat-collector.git
git clone git@github.com:bescriptkiddie/dsh-wechat-collector.git
README.md main

dsh-wechat-collector

中文说明

A DSH-native control panel and tool set for collecting WeChat Official Account
articles, analyzing an explicitly selected creator with DeepSeek, reviewing
local reports, and handing source cards to ContentStudio.

DSH WeChat collector panel

The plugin is the DSH layer. It provides the right-edge panel, agent tools,
first-run setup, QR-login flow, collection controls, feedback writeback, and
ContentStudio import. The bundled Python runtime is a sanitized subset of
pika-weixin-collection.

Install

The curated market listing is pending. Until it is merged, install the public
GitHub source directly:

dsh plugin --profile web add github:bescriptkiddie/dsh-wechat-collector

Restart the managed DSH web process if your running profile does not hot-load
the new bundle. The right edge of DSH will show 公众号.

First run on macOS

Open 公众号 and choose 安装本地运行时. Before doing anything, the panel
discloses the exact local changes and asks for confirmation. The action then:

  1. downloads uv 0.12.6 from Astral's GitHub Release and verifies its pinned
    SHA-256;
  2. deploys the credential-free, user-data-free runtime bundled in this package
    under ~/.local/share/dsh-wechat-collector;
  3. creates a current-user launchd service bound to 127.0.0.1:8000;
  4. verifies the local API before reporting success.

No install or postinstall lifecycle script performs this setup automatically.
The built-in runtime currently supports Apple Silicon and Intel Macs. On other
platforms, the plugin can still connect to an already running compatible API
through its collectorBaseUrl setting.

What it provides

  • wechat_collector_runtime — inspect, explicitly install, start, stop, or
    unconfigure the local runtime.
  • wechat_collector_login — start or inspect local QR login; QR image data is
    confined to the loopback panel route.
  • wechat_collector_account — search, add, list, or remove tracked accounts.
  • wechat_collector_crawl — start collection and manage its daily schedule.
  • wechat_collector_items — read recent source candidates and previews.
  • wechat_collector_feedback — write a real human decision back to the source
    item.
  • wechat_collector_analysis_config — inspect the secret-safe analysis setup or
    test the configured DeepSeek-compatible endpoint.
  • wechat_collector_author_analysis — run, list, or read local evidence-bounded
    creator-analysis reports.
  • wechat_collector_import_to_studio — idempotently create ContentStudio
    source cards and a JSON receipt.
  • studio_wechat_collect — compatibility entry for the ContentStudio workflow.

The panel also exposes the normal path: install/start → QR login → add account
→ collect → configure DeepSeek → select account and analysis skill → review the
report → import source cards.

Creator analysis

The panel stores the API key through DSH credentials under the
DEEPSEEK_API_KEY reference. Plugin settings and reports never contain the key.
The built-in analysis skills cover full author methodology, topic/title focus,
and structure/expression focus.

Analysis runs only after an explicit account-level action. At most 6,000
characters per article and 60,000 characters total are sent to the configured
DeepSeek-compatible endpoint. Reports stay under
~/.local/share/dsh-wechat-collector/analysis/reports and are viewable in the
panel. Fewer than five substantial articles are always labelled as a small
sample.

Evidence and publishing boundary

Collected previews are source leads, not verified facts, and not personal voice
samples. Creator analysis extracts methods and structures; it does not clone
identity, private experience, proprietary resources, data, or signature wording.
The plugin does not publish to WeChat.
Formatting, draft-box upload, and final publication stay in the separate
ContentStudio publishing workflow with human confirmation.

Data and uninstall

WeChat credentials and collected data stay under
~/.local/share/dsh-wechat-collector/data. DeepSeek credentials stay in DSH's
credential provider, while analysis settings and reports stay under
~/.local/share/dsh-wechat-collector/analysis. They are not included in the npm
package and credentials are not returned by agent tools.

Before removing the plugin, choose 停用常驻服务 in the panel or explicitly
run wechat_collector_runtime(action=unconfigure). This stops launchd and moves
its plist into a recoverable backup. Plugin removal intentionally preserves
credentials, collected articles, and runtime files. See PRIVACY.md
and SECURITY.md.

Development

Requires Node.js 22.19 or newer.

npm install --ignore-scripts
npm run check
npm test
npm pack --dry-run

The package ships prebuilt JavaScript and Python source. It has no install-time
build step.

License

MIT. The vendored runtime source and its provenance receipt are under
runtime/.