SkillsGrove
SkillsGrove/ドキュメント作成/WorkHaH/SheetWeave/sheetweave

sheetweave

インストール

$npx skills add https://github.com/WorkHaH/SheetWeave --skill sheetweave
$git clone --depth 1 https://github.com/WorkHaH/SheetWeave.git /tmp/SheetWeave && mkdir -p ~/.claude/skills && cp -r /tmp/SheetWeave/. ~/.claude/skills/sheetweave
この Agent Skill をインストールしてください:https://github.com/WorkHaH/SheetWeave/tree/bee95a4616b242383b614fd7c2c0b40c009103f8/ — まず SKILL.md とスクリプトを読み、安全であることを確認してから、私のスキルフォルダにインストールしてください。

概要

原文の説明 · MITMerge tiled local/detail drawing PDFs into one larger vector PDF. Use when a PDF contains multiple partial drawing sheets, may include an overview/index page, and the user wants faster layout recovery plus final vector output rather than raster-only stitching.
以下の SKILL.md は WorkHaH/SheetWeave(コミット bee95a4)から MIT ライセンスに基づいて転載しています。本文は変更しておらず、ファイル先頭のメタデータのみ省略し、画像はリンクとして表示し、非常に長いファイルは途中までの表示としています。Copyright 2026 SheetWeave contributors。ライセンス:LICENSE。表示しているのは指示ファイルのみです。スクリプト等は元のリポジトリをご覧ください。

SheetWeave

Use this skill to merge one PDF containing tiled drawing sheets into a larger drawing while preserving vector output.

Prerequisites

  • Install Python dependencies with pip install -r scripts/requirements.txt.
  • Ensure pdfinfo, pdftoppm, pdftotext, and pdflatex are available in PATH.
  • Work from this skill directory, or pass absolute paths to the scripts.

Workflow

  1. Decide whether the PDF has an overview/thumbnail page. It is usually the first page or the last page.
  2. If the overview has machine-readable labels, let the script parse sheet codes or numeric labels automatically.
  3. If labels are visible to a person but code cannot extract them reliably, use references/overview_layout_prompt.md with a VLM or human to create an overview layout JSON, then run with --overview-layout-json.
  4. If there is no usable overview/thumbnail page, or if the overview truly has no labels, run the traditional overlap-neighbor route.
  5. Run:
python scripts/sheetweave.py \
  --pdf path/to/drawings.pdf \
  --out path/to/output-dir \
  --mode review
  1. Inspect summary.json, final/full-merged.png, and final/layout-contact.png when present.
  2. Use final/full-merged.pdf when summary.json shows a single connected component.
  3. If multiple groups are produced, inspect groups/group-XX/ and summary.json to see which pages failed to bridge.
  4. If vlm-request.json is produced, read references/overview_layout_prompt.md, create an overview layout JSON, and rerun with --overview-layout-json.

Behavior

  • The script renders low-resolution page images only for layout recovery.
  • It first looks for overview/index/thumbnail layout candidates, normally on the first or last PDF page.
  • It uses sheet-code or numeric labels when code can extract them.
  • If labels are visible but not machine-readable, the intended workflow is VLM/human layout mapping rather than blind guessing.
  • It falls back to neighbor overlap matching when no overview/thumbnail page is usable or when the overview has no labels.
  • It can recover disconnected components with selective high-DPI bridge matching.
  • It writes the final merged PDF by embedding original PDF pages into a LaTeX/TikZ canvas, so vector source content stays vector.

Important Options

  • --render-dpi: low DPI used for fast layout recovery. Default: 42.
  • --bridge-render-dpi: higher DPI used only for cross-component bridge recovery. Default: 110.
  • --mode review: write extra diagnostics; recommended for new drawing formats.
  • --overview-layout-json: use a manual or VLM-produced overview mapping.

Output Files

  • summary.json: main run summary and diagnostics.
  • final/full-merged.pdf: final vector output when there is one component.
  • final/full-merged.png: raster review preview.
  • final/full-merged.tex: generated vector assembly source.
  • vlm-request.json: ambiguity handoff for manual/VLM overview mapping.
ライセンス全文を見る(MIT)
MIT License

Copyright (c) 2026 SheetWeave contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.