← スキル一覧に戻る

pdf-translation
by wayne930242
A customizable Astro + Starlight template for game documentation sites
⭐ 0🍴 0📅 2026年1月22日
SKILL.md
name: pdf-translation description: PDF 遊戲規則轉換與翻譯流程。Use when processing PDF files, extracting content, splitting chapters, or translating game documentation.
PDF Translation Workflow
Phase 1: Extract PDF
cd scripts
uv run python extract_pdf.py ../data/pdfs/<filename>.pdf
Outputs (in data/markdown/):
| File | Purpose |
|---|---|
<name>.md | Clean text (markitdown) |
<name>_pages.md | With <!-- PAGE N --> markers |
images/<name>/ | Extracted images |
Phase 2: Configure Chapters
- Generate template:
uv run python split_chapters.py --init - Edit
chapters.json:
{
"source": "data/markdown/<name>_pages.md",
"output_dir": "docs/src/content/docs",
"clean_patterns": ["\\(Order #\\d+\\)"],
"chapters": {
"section-slug": {
"title": "章節標題",
"order": 1,
"files": {
"filename": {
"title": "頁面標題",
"description": "SEO 描述",
"pages": [1, 10],
"order": 0
}
}
}
}
}
- Split:
uv run python split_chapters.py
Phase 3: Translation
For each markdown file in docs/src/content/docs/:
- Identify terms - Extract English game terms
- Check glossary - Lookup in
glossary.json - Translate - Apply consistent terminology
- Preserve structure - Keep frontmatter, headings, lists intact
Translation Rules
- Maintain original meaning, avoid over-localization
- Game mechanics terms: use established translations
- Proper nouns: keep original or use accepted translations
- Format: preserve markdown syntax exactly
Phase 4: Quality Check
| Check | Action |
|---|---|
| Terminology | Verify against glossary.json |
| Completeness | Compare page count with original |
| Format | Validate frontmatter, links |
| Preview | cd docs && bun dev |
Troubleshooting
| Issue | Solution |
|---|---|
| Garbled text | PDF may have non-standard encoding; try different extraction |
| Missing pages | Check _pages.md for page markers |
| Broken images | Verify image paths in images/ folder |
| Format issues | Use clean_patterns to remove artifacts |
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です