zouchenzhen/thesis-defense-pptx-skill / skills/thesis-defense-pptx
thesis-defense-pptx
VerifiedCreate, polish, and quality-check editable undergraduate or graduate thesis defense PowerPoint decks from a local thesis PDF/LaTeX project and an existing PPTX template. Use when the user asks for a formal defense PPT, thesis presentation, academic答辩PPT, template-matched PPTX, or local PowerPoint deck generation with visual inspection.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.5 KB |
| agents/openai.yaml | config | 255 B |
| references/pptx_quality_gate.md | markdown | 3.3 KB |
| requirements.txt | manifest | 58 B |
| scripts/clone_template_deck.ps1 | script | 2.6 KB |
| scripts/dump_pptx_content.py | script | 4.8 KB |
| scripts/export_pptx_png.ps1 | script | 1.5 KB |
| scripts/extract_thesis_context.py | script | 5.4 KB |
| scripts/inspect_pptx_overflow.ps1 | script | 3.9 KB |
| scripts/make_contact_sheet.py | script | 2.3 KB |
| scripts/pptx_template_tools.py | script | 9.8 KB |
| scripts/scan_pptx_text.py | script | 2.4 KB |
scripts/scan_pptx_text.py
View on GitHubfrom __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
from pptx import Presentation
# Windows 默认 stdout 是 cp936/gbk,遇到 −/✓/Δ 等 Unicode 字符会 UnicodeEncodeError。
# 这里强制切到 UTF-8,errors=replace 兜底以避免脚本因终端编码崩溃。
try:
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
sys.stderr.reconfigure(encoding="utf-8", errors="replace")
except Exception:
pass
def iter_shapes(shapes):
for shape in shapes:
yield shape
if hasattr(shape, "shapes"):
yield from iter_shapes(shape.shapes)
def shape_texts(shape) -> list[str]:
texts: list[str] = []
if getattr(shape, "has_text_frame", False) and shape.text:
text = " ".join(shape.text.split())
if text:
texts.append(text)
if getattr(shape, "has_table", False):
for cell in shape.table.iter_cells():
text = " ".join(cell.text.split())
if text:
texts.append(text)
return texts
def main() -> int:
parser = argparse.ArgumentParser(description="Scan PPTX text and optional forbidden terms.")
parser.add_argument("--pptx", required=True)
parser.add_argument("--bad", default="", help="Comma-separated terms that should not remain")
parser.add_argument("--json", default="", help="Optional JSON output path")
args = parser.parse_args()
pptx = Path(args.pptx).expanduser().resolve()
bad_terms = [x.strip() for x in args.bad.split(",") if x.strip()]
prs = Presentation(str(pptx))
slides = []
hits = []
for idx, slide in enumerate(prs.slides, 1):
texts = []
for shape in iter_shapes(slide.shapes):
texts.extend(shape_texts(shape))
joined = "\n".join(texts)
slide_hits = [term for term in bad_terms if term in joined]
if slide_hits:
hits.append({"slide": idx, "terms": slide_hits})
slides.append({"slide": idx, "text": joined})
payload = {"pptx": str(pptx), "slide_count": len(prs.slides), "bad_hits": hits, "slides": slides}
text = json.dumps(payload, ensure_ascii=False, indent=2)
if args.json:
out = Path(args.json).expanduser().resolve()
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(text, encoding="utf-8")
print(text)
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |