Agent Skillsdaymade/claude-code-skills › wps-doc-scraper

wps-doc-scraper

GitHub

用于无登录抓取并归档公开的WPS/KDocs及ProcessOn文档。提取原始API JSON、SVG/PNG画布及Markdown,严格保留源数据保真度,禁止内容改写或越权访问。

wps-doc-scraper/SKILL.md daymade/claude-code-skills

Trigger Scenarios

用户请求抓取公开链接 需要保存为Markdown或原始素材 要求下载过程线导图

Install

npx skills add daymade/claude-code-skills --skill wps-doc-scraper -g -y
More Options

Non-standard path

npx skills add https://github.com/daymade/claude-code-skills/tree/main/wps-doc-scraper -g -y

Use without installing

npx skills use daymade/claude-code-skills@wps-doc-scraper

指定 Agent (Claude Code)

npx skills add daymade/claude-code-skills --skill wps-doc-scraper -a claude-code -g -y

安装 repo 全部 skill

npx skills add daymade/claude-code-skills --all -g -y

预览 repo 内 skill

npx skills add daymade/claude-code-skills --list

SKILL.md

Frontmatter
{
    "name": "wps-doc-scraper",
    "description": "Faithfully archive public WPS\/KDocs\/金山文档 links, especially embedded ProcessOn .pof mind maps and canvases, as raw source data, original SVG\/PNG, and Markdown. Use when a user gives a kdocs.cn or wps.processon.com link and asks to scrape, save, download, 扒下来, 归档, or 转 Markdown without logging in or saving the document to an account."
}

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:

    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.
    python3 /path/to/wps-doc-scraper/scripts/render_svg_tiles.py \
      --svg "/path/to/<title>-全画布.svg" \
      --output "/path/to/<title>-全画布.png"
    
  4. 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 .pof mind 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 with foreignObject text. 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.

Version History

  • e00a2ec Current 2026-08-20 11:29

Same Skill Collection

capture-screen/SKILL.md
cloudflare-troubleshooting/SKILL.md
codex-image-gallery/SKILL.md
daymade-claude-code/claude-skills-troubleshooting/SKILL.md
daymade-claude-code/claude-usage-analyst/SKILL.md
daymade-claude-code/continue-claude-work/SKILL.md
daymade-claude-code/marketplace-dev/SKILL.md
daymade-docs/doc-to-markdown/SKILL.md
daymade-docs/mermaid-tools/SKILL.md
daymade-docs/ppt-creator/SKILL.md
daymade-financial/ashare-news-fetcher/SKILL.md
daymade-financial/devils-advocate/SKILL.md
daymade-financial/gangtise-copilot/SKILL.md
daymade-financial/pharma-daily-report/SKILL.md
daymade-skill/skill-reviewer/SKILL.md
daymade-skill/skills-search/SKILL.md
design-style-picker/SKILL.md
douban-skill/SKILL.md
download-gemini-images/SKILL.md
excel-automation/SKILL.md
fact-checker/SKILL.md
gemini-history-analyzer/SKILL.md
github-ops/SKILL.md
github-sensitive-data-cleanup/SKILL.md
i18n-expert/SKILL.md
llm-icon-finder/SKILL.md
macos-cleaner/SKILL.md
notify-wecom/SKILL.md
openclaw/SKILL.md
product-analysis/SKILL.md
prompt-optimizer/SKILL.md
promptfoo-evaluation/SKILL.md
repomix-unmixer/SKILL.md
scrapling-skill/SKILL.md
setup-notifications-via-wecom/SKILL.md
slides-creator/SKILL.md
ui-designer/SKILL.md
video-comparer/SKILL.md
youtube-downloader/SKILL.md
auto-repo-setup/SKILL.md
benchmark-due-diligence/SKILL.md
bilibili-source/SKILL.md
cli-demo-generator/SKILL.md
competitors-analysis/SKILL.md
daymade-audio/asr-transcribe-to-text/SKILL.md
daymade-audio/meeting-minutes-taker/SKILL.md
daymade-audio/stepfun-asr/SKILL.md
daymade-audio/stepfun-tts/SKILL.md
daymade-audio/transcript-fixer/SKILL.md

Metadata

Files
0
Version
e00a2ec
Hash
e958a3f4
Indexed
2026-08-20 11:29

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 07:40
浙ICP备14020137号-1 $mapa de visitantes$