wps-doc-scraper
- 作者仓库星标 0
- 作者更新于 2026年8月24日 15:33
- 作者仓库 claude-code-skills
WPS Doc Scraper
Overview
Archive WPS/KDocs public documents with source fidelity. Prefer unauthenticated data APIs, keep the raw payloads, capture the original visual artifact when the document is a canvas or mind map, and generate Markdown only as a structured representation of the source.
This is an extraction skill, not a writing skill. Do not use an LLM to rewrite, summarize, smooth, or infer missing document content unless the user explicitly asks for a separate analysis after the archive is complete.
Workflow Decision Tree
Identify the URL type.
kdocs.cn/view/l/<share_id>orkdocs.cn/l/<share_id>: read public link metadata first.wps.processon.com/diagrams/view?...: extractfile_idandgroup_id, then use the ProcessOn data API.wps.processon.com/wpsapi/diagrams/view/api?...: treat as the source API directly.- Other WPS/KDocs pages: collect public metadata, try official public export/download only when available, then use browser DOM capture as a fallback.
For ProcessOn
.pofmind maps or canvases, run the API extractor:python3 /path/to/wps-doc-scraper/scripts/wps_processon_extract.py \ --url "https://www.kdocs.cn/view/l/..." \ --output-dir "/path/to/archive-dir"Expected outputs:
processon-api.json,processon-definition.json,capture-manifest.json, and<title>.md.Capture the original image.
- If the page exposes a rendered SVG, save the serialized full SVG as
<title>-全画布.svg. - If the SVG uses
foreignObject, do not trust ImageMagick alone for text rendering. Usescripts/render_svg_tiles.pyto make the PNG through macOS Quick Look square tiles.
python3 /path/to/wps-doc-scraper/scripts/render_svg_tiles.py \ --svg "/path/to/<title>-全画布.svg" \ --output "/path/to/<title>-全画布.png"- If the page exposes a rendered SVG, save the serialized full SVG as
Validate the archive.
- Markdown is a structural conversion, not an editorial rewrite.
- The original image exists for visual documents.
- Raw JSON and manifest exist.
- No output text contains the Unicode replacement character
�. - Any failed or permission-limited path is recorded in the manifest or final response.
Hard Rules
- Never log in, save to an account, copy into the user's cloud drive, or mutate the remote document unless the user explicitly requests it.
- Never bypass CAPTCHAs, paywalls, tenant restrictions, or permission walls. A public link that requires login is a hard boundary unless the user provides authorized access.
- Do not infer hidden nodes or missing text. Preserve what the API or rendered DOM actually exposes.
- HTTP 200 is not enough. Detect login-wall payloads such as
用户未登录, empty definitions, and placeholder shells. - Keep raw source artifacts before transformation: API JSON, parsed definition JSON, serialized SVG, screenshots or PNGs, and a capture manifest.
- For browser fallback, capture DOM/source data before screenshots when possible; screenshots alone are not a faithful text archive.
- Report extraction gaps plainly. Do not silently produce a polished Markdown file from partial data.
Bundled Resources
scripts/
wps_processon_extract.py: deterministic extractor for public WPS/KDocs ProcessOn.pofmind maps. It resolves KDocs share metadata, downloads the ProcessOn data API JSON, parses the embedded definition, and writes Markdown plus a manifest.render_svg_tiles.py: macOS Quick Look based SVG-to-PNG renderer for full-canvas SVGs withforeignObjecttext. It renders square vertical tiles and stitches them into one PNG.
references/
processon-mindmap-api.md: endpoint pattern and payload shape for WPS-hosted ProcessOn files.rendered-svg-capture.md: browser-side process for extracting the rendered full-canvas SVG and producing a PNG.capture-manifest.md: minimum manifest fields and acceptance checks.permission-and-failure-boundaries.md: login walls, forbidden escalation, and failure reporting rules.
- 流狐分类
- 设计与多媒体
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @daymade · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Archive WPS/KDocs public documents with source fidelity. Prefer unauthenticated data APIs, keep the raw payloads, capture the original visual artifact when the document is a canvas or mind map, and generate Markdown only as a structured representation of the…
Identify the URL type. kdocs.cn/view/l/<shareid> or kdocs.cn/l/<shareid>: read public link metadata first. wps.processon.com/diagrams/view?...: extract fileid and groupid, then use the ProcessOn data API.
Never log in, save to an account, copy into the user's cloud drive, or mutate the remote document unless the user explicitly requests it. Never bypass CAPTCHAs, paywalls, tenant restrictions, or permission walls. A public link that requires login is a hard…
Bundled Resources
wpsprocessonextract.py: deterministic extractor for public WPS/KDocs ProcessOn .pof mind maps. It resolves KDocs share metadata, downloads the ProcessOn data API JSON, parses the embedded definition, and writes Markdown plus a manifest.
processon-mindmap-api.md: endpoint pattern and payload shape for WPS-hosted ProcessOn files. rendered-svg-capture.md: browser-side process for extracting the rendered full-canvas SVG and producing a PNG. capture-manifest.md: minimum manifest fields and…
# WPS Doc Scraper
## Overview
Archive WPS/KDocs public documents with source fidelity. Prefer unauthenticated data APIs, keep the raw payloads, capture the original visual artifact when the document is a canvas or mind map, and generate Markdown only as a structured representation of the source.
This is an extraction skill, not a writing skill. Do not use an LLM to rewrite, summarize, smooth, or infer missing document content unless the user explicitly asks for a separate analysis after the archive is complete.
## Workflow Decision Tree
1. Identify the URL type.
- `kdocs.cn/view/l/<share_id>` or `kdocs.cn/l/<share_id>`: read public link metadata first.
- `wps.processon.com/diagrams/view?...`: extract `file_id` and `group_id`, then use the ProcessOn data API.
- `wps.processon.com/wpsapi/diagrams/view/api?...`: treat as the source API directly.
- Other WPS/KDocs pages: collect public metadata, try official public export/download only when available, then use browser DOM capture as a fallback.
2. For ProcessOn `.pof` mind maps or canvases, run the API extractor:
```bash
python3 /path/to/wps-doc-scraper/scripts/wps_processon_extract.py \
--url "https://www.kdocs.cn/view/l/..." \
--output-dir "/path/to/archive-dir"
```
Expected outputs: `processon-api.json`, `processon-definition.json`, `capture-manifest.json`, and `<title>.md`.
3. Capture the original image.
- If the page exposes a rendered SVG, save the serialized full SVG as `<title>-全画布.svg`.
- If the SVG uses `foreignObject`, do not trust ImageMagick alone for text rendering. Use `scripts/render_svg_tiles.py` to make the PNG through macOS Quick Look square tiles.
```bash
python3 /path/to/wps-doc-scraper/scripts/render_svg_tiles.py \
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Overview → Workflow Decision Tree → Hard Rules → Bundled Resources → scripts/ → references/
要点 -> Archive WPS/KDocs public documents with source fidelity. · This is an extraction skill, not a writing skill. · 1. Identify the URL type. · Expected outputs: processon-api.json, processon-definition.json, capture-manifest.json, and <title>.md. · 3. Capture the original image. · 4. Validate the archive. · - Never log in, save to an account, copy into the user's cloud drive, or mutate the remote document unless the user explicitly requests it. · - wpsprocessonextract.py: deterministic extractor for public WPS/KDocs ProcessOn .pof mind maps.
文件/命令 -> kdocs.cn/view/l/<shareid> · kdocs.cn/l/<shareid> · wps.processon.com/diagrams/view?... · fileid · groupid · wps.processon.com/wpsapi/diagrams/view/api?... · .pof · processon-api.json
内容 SHA-256 -> f7e77b9e590f
方法与流程
适用与边界
原文中的明确线索
kdocs.cn/view/l/<shareid>、kdocs.cn/l/<shareid>、wps.processon.com/diagrams/view?...、fileid、groupid、wps.processon.com/wpsapi/diagrams/view/api?...、.pof、processon-api.json