ruler-progress-render

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ruler Progress Render

尺子进度渲染

Workflow

工作流

  1. Use
    scripts/render_ruler_progress.sh
    from this skill.
  2. Pass
    workspace_dir
    as the first argument when the user specifies a folder; otherwise use current directory.
  3. Pass
    output_path
    as the second argument when the user specifies output; otherwise use
    out/scaffold-demo-defaults-transparent.mov
    .
  4. Run the script and wait for completion.
  5. Return the final absolute output path printed by the script.
  1. 使用本技能中的
    scripts/render_ruler_progress.sh
    脚本。
  2. 当用户指定文件夹时将
    workspace_dir
    作为第一个参数传入,否则使用当前目录。
  3. 当用户指定输出路径时将
    output_path
    作为第二个参数传入,否则使用
    out/scaffold-demo-defaults-transparent.mov
  4. 运行脚本并等待执行完成。
  5. 返回脚本输出的最终绝对输出路径。

Command

命令

bash
bash scripts/render_ruler_progress.sh [workspace_dir] [output_path]
bash
bash scripts/render_ruler_progress.sh [workspace_dir] [output_path]

Behavior

行为说明

  • Reuse local repo if
    workspace_dir/ruler-progress-animator
    exists; otherwise clone from GitHub.
  • Track remote default branch (
    origin/HEAD
    ) when updating existing repo.
  • Install npm dependencies.
  • If
    bunx
    is available, run the new scaffold flow:
    • npm run remotion:ensure-browser
    • REMOTION_OUTPUT=... REMOTION_PROPS_FILE=shared/project/render-presets/default.json npm run remotion:render
  • This flow reuses shared Chrome Headless Shell cache and avoids repeated browser downloads.
  • If
    bunx
    is unavailable, fallback to
    npx remotion render
    with equivalent defaults as a compatibility path (without shared browser cache optimization).
  • 如果
    workspace_dir/ruler-progress-animator
    存在则复用本地仓库,否则从GitHub克隆。
  • 更新现有仓库时跟踪远程默认分支(
    origin/HEAD
    )。
  • 安装npm依赖。
  • 如果
    bunx
    可用,运行新的脚手架流程:
    • npm run remotion:ensure-browser
    • REMOTION_OUTPUT=... REMOTION_PROPS_FILE=shared/project/render-presets/default.json npm run remotion:render
  • 该流程会复用共享的Chrome Headless Shell缓存,避免重复下载浏览器。
  • 如果
    bunx
    不可用,回退到使用
    npx remotion render
    及等效默认参数的兼容路径(无共享浏览器缓存优化)。

Requirements

依赖要求

  • git
  • node
  • npm
  • network access for clone/update and dependency install
  • git
  • node
  • npm
  • 网络连接,用于克隆/更新仓库和安装依赖