wx-video-account-notes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

微信视频号下载与笔记整理

WeChat Channels Video Download and Note Organization

处理一个视频号分享链接,生成可供 agent 继续整理的结构化笔记材料。
Process a WeChat Channels share link to generate structured note materials for further organization by agents.

触发条件

Trigger Conditions

仅在用户提供
https://weixin.qq.com/sph/...
视频号分享链接,并要求继续处理时使用。
This tool is only used when the user provides a WeChat Channels share link in the format
https://weixin.qq.com/sph/...
and requests further processing.

输入

Inputs

  • 必需:一个视频号分享链接
  • 可选:输出目录
  • 可选:期望标题或文件名
  • Required: A WeChat Channels share link
  • Optional: Output directory
  • Optional: Desired title or filename

固定流程

Fixed Workflow

  1. Windows 运行
    pwsh -File "scripts/bootstrap.ps1"
    ;macOS/Linux 运行
    sh scripts/bootstrap.sh
  2. Windows 运行
    pwsh -File "scripts/invoke_pipeline.ps1" -ShareUrl "https://weixin.qq.com/sph/..."
    ;macOS/Linux 运行
    sh scripts/invoke_pipeline.sh --share-url "https://weixin.qq.com/sph/..."
  3. pipeline 负责下载视频或图文动态图片、抽帧、OCR、ASR,生成
    note_materials.json
  4. 当前 agent / model 基于
    note_materials.json
    写最终
    <slug>.md
  5. 如果用户明确说不要笔记,跳过最终
    <slug>.md
  1. On Windows, run
    pwsh -File "scripts/bootstrap.ps1"
    ; on macOS/Linux, run
    sh scripts/bootstrap.sh
    .
  2. On Windows, run
    pwsh -File "scripts/invoke_pipeline.ps1" -ShareUrl "https://weixin.qq.com/sph/..."
    ; on macOS/Linux, run
    sh scripts/invoke_pipeline.sh --share-url "https://weixin.qq.com/sph/..."
    .
  3. The pipeline is responsible for downloading videos or images from graphic posts, frame extraction, OCR, ASR, and generating
    note_materials.json
    .
  4. The current agent/model writes the final
    <slug>.md
    based on
    note_materials.json
    .
  5. Skip generating the final
    <slug>.md
    if the user explicitly states they don't want the note.

输出约定

Output Convention

text
<output-dir>/
  <slug>.mp4        # 仅视频动态
  note_materials.json
  raw.json
  ocr.txt
  asr.txt
  ocr_frames/
  frames/
  audio/
默认情况下,当前 agent / model 还应写出同目录的
<slug>.md
。如果用户明确说不要笔记,跳过该文件。
text
<output-dir>/
  <slug>.mp4        # Video posts only
  note_materials.json
  raw.json
  ocr.txt
  asr.txt
  ocr_frames/
  frames/
  audio/
By default, the current agent/model should also write
<slug>.md
in the same directory. Skip this file if the user explicitly says they don't want the note.

成稿规则

Drafting Rules

  • note_materials.json
    为主。
  • 必要时对照
    raw.json
    ocr.txt
    asr.txt
  • 参考
    resources/model-note-template.md
  • 不要编造提取结果中不存在的信息。
  • 如果
    note_materials.json
    包含
    visual_frames
    字段,且当前模型有识图能力,必须读取
    visual_frames
    对应图片辅助理解视频内容。
  • 对图文动态,
    visual_frames
    是原始图片素材;如果当前模型有识图能力,必须读取这些图片补充 OCR 无法表达的版式、界面、图表或视觉上下文。
  • Prioritize using
    note_materials.json
    .
  • Cross-reference with
    raw.json
    ,
    ocr.txt
    ,
    asr.txt
    when necessary.
  • Refer to
    resources/model-note-template.md
    .
  • Do not fabricate information that does not exist in the extracted results.
  • If
    note_materials.json
    contains the
    visual_frames
    field and the current model has image recognition capabilities, you must read the corresponding images in
    visual_frames
    to assist in understanding the video content.
  • For graphic posts,
    visual_frames
    are the original image materials; if the current model has image recognition capabilities, you must read these images to supplement layout, interface, charts, or visual context that cannot be expressed by OCR.

失败处理

Failure Handling

  • 如果自举失败,停止并明确说明失败的资产或命令。
  • 如果 OCR 或 ASR 失败,在材料和最终 Markdown 中明确标记失败。
  • 不要把失败结果伪装成成功。
  • If bootstrap fails, stop and clearly state the failed asset or command.
  • If OCR or ASR fails, clearly mark the failure in the materials and final Markdown.
  • Do not disguise failure results as success.

实施要求

Implementation Requirements

  • 优先使用 skill 目录下当前平台的
    .runtime/<os>-<arch>/
    环境,不依赖系统 PATH。
  • 低层下载、抽帧、抽音频、OCR、ASR 由脚本和 Python 完成。
  • 视频动态中,
    ocr_frames/
    存放 ffmpeg 直接裁出的字幕区域小图;
    frames/
    只保留少量完整参考帧,供
    visual_frames
    使用。
  • 图文动态中,
    frames/
    存放下载到的原始图片,供 OCR 和
    visual_frames
    使用;该类动态跳过 ASR。
  • 当前 agent / model 只负责基于材料整理最终
    <slug>.md
  • Prioritize using the
    .runtime/<os>-<arch>/
    environment for the current platform in the skill directory, without relying on the system PATH.
  • Low-level tasks such as downloading, frame extraction, audio extraction, OCR, and ASR are completed by scripts and Python.
  • For video posts,
    ocr_frames/
    stores small cropped images of subtitle areas directly extracted by ffmpeg;
    frames/
    only retains a small number of complete reference frames for use in
    visual_frames
    .
  • For graphic posts,
    frames/
    stores the downloaded original images for OCR and
    visual_frames
    ; skip ASR for this type of post.
  • The current agent/model is only responsible for organizing the final
    <slug>.md
    based on the materials.