ワンクリックで
daggerheart-json-formatter
Identify the type of a translated Daggerheart text and format it into JSON according to template.md.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Identify the type of a translated Daggerheart text and format it into JSON according to template.md.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Orchestrates the end-to-end Daggerheart translation flow: project setup, source-to-Markdown conversion, Markdown cleanup, glossary tagging, chunked translation with retained term markers, term review, marker stripping, validation, and JSON extraction.
Rewrite Daggerheart text into natural Chinese first, with terminology consistency enforced via REFERENCE.md. Use when translating, polishing, or reviewing Chinese Daggerheart text.
Build a per-occurrence term review report from tagged source chunks and translated chunks, then strip approved term markers into a clean chunk directory for merge.
Convert Daggerheart source files to raw Markdown. Decision-tree: plaintext → direct copy; PDF/DOCX → local tools (marker/mineru) or manual online tools (PaddleOCR). Outputs source/_raw.md.
Extract document-specific glossary from Daggerheart project original text. Scans source/_original.md for proper nouns and recurring unique concepts, outputs glossary/_glossary.json with shortest-root terms and variants. Use during daggerheart-translation-pipeline step 3, or when user says "提取术语表" or "run step 3".
Repair converted Daggerheart raw Markdown into clean source Markdown. Reads source/_raw.md, writes source/_original.md, and only fixes formatting without changing content.
| name | daggerheart-json-formatter |
| description | Identify the type of a translated Daggerheart text and format it into JSON according to template.md. |
将翻译后的中文 Daggerheart 文本识别类型并转换为结构化 JSON。严格按照 examples/template.md 中的模板格式输出。
examples/template.md,使用该类型的精确 JSON schema优先手动提取。 文档中总会有 OCR 错误、标题层级混乱等格式异常,强行使用自动化工具反而容易出错。逐块读取相关原文, 然后根据模板手动构造JSON. 一次只读一段/一个种类的原文进行构造, 不要强行一次读全文.
批量提取用脚本。 当译文格式一致、实体数量大(如数百张敌人卡),应编写 Python 提取脚本,通过正则解析 Markdown 结构批量生成 JSON。脚本提取的关键经验:
## )分割,排除 ## **特性**、## **特殊** 等子章节标题utf-8-sig 读文件避免 BOM 干扰(.+?)\s*([A-ZÀ-ÿ].+)$ 处理 : () 重音字符和无空格边界"名称" "原文" "类型" "特性" 等)"无" / "-" 或空数组 [],不要编造"12" 而非 12)"名称" "原名" "类型" "特性描述""类型" "种类" 等分类字段只保留核心类别,不混入修饰符。如源文中 (2) - 被动 → "类型": "被动",修饰符 (2) 放到 "名称" 字段中**花费 1 恐惧点**、*脆弱*SKILL 输出的 JSON 为 zzz 格式(扁平列表,每张卡一个独立条目)。如需其他格式,使用 scripts/ 下的脚本转换:
| 脚本 | 用途 |
|---|---|
scripts/zzz2rrr.py | zzz 格式 ↔ rrr 格式(各实体类型分组打包)。用法:python zzz2rrr.py <输入.json> --zzz(zzz→rrr)或 --rrr(rrr→zzz),也支持 .dhcb |
scripts/zzz2keyword.py | zzz/rrr 格式 → SealChat 术语表关键词列表。用法:python zzz2keyword.py <输入.json>,输出 _keyword.json |
需要时才转换,一般不需要。不需要依赖。
有模板就按模板提取。规则书、背景、叙事文本等非卡牌内容保留 Markdown,不强行结构化。不臆造字段。