# congyuemao/university-xueba-notes architecture

> Architecture diagram of the GitHub repository congyuemao/university-xueba-notes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/congyuemao/university-xueba-notes
- Repository: https://github.com/congyuemao/university-xueba-notes

## Overview

This repository packages a Codex skill and local Python tools for turning course material into Chinese-language university study-note PDFs. The main workflow is: a learner provides course material and edition requirements, the skill guides chapter-content preparation, and the PDF filler overlays that content onto print or digital masters, optionally producing a foldout reference. Other documented capabilities include reusable joke/quotation selection, paragraph-specific highlights, and font preparation. Edges reflect README statements or the supplied source index; unsampled skill guidance and resource wiring are not inferred.

Main entry points: [`skills/artifact-template-university-xueba-notes/scripts/fill_template.py`](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/fill_template.py) (PDF Filler), [`skills/artifact-template-university-xueba-notes/Resources/content/statistics-chapter.json`](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/Resources/content/statistics-chapter.json) (Chapter Content), [`skills/artifact-template-university-xueba-notes/SKILL.md`](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/SKILL.md) (Notes Skill), [`skills/artifact-template-university-xueba-notes/Resources/templates`](https://github.com/congyuemao/university-xueba-notes/tree/main/skills/artifact-template-university-xueba-notes/Resources/templates) (PDF Masters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Content Authoring"]
  node_skill["Notes Skill<br/>[SKILL.md]"]
end

subgraph group_rendering["PDF Rendering"]
  node_filler["PDF Filler<br/>[fill_template.py]"]
  node_layout["Layout Metrics"]
  node_highlights["Highlight Mapping"]
end

subgraph group_resources["Content Resources"]
  node_chapter_content["Chapter Content"]
  node_fun_catalog["Fun Catalog<br/>[items.jsonl]"]
  node_templates["PDF Masters"]
  node_illustrations["Illustrations"]
end

subgraph group_utilities["Supporting Tools"]
  node_picker["Fun Selector"]
  node_font_prep["Font Preparation<br/>[prepare_fonts.py]"]
  node_book_plan["Plan Validator"]
end

node_learner(("Learner"))
node_pdf["Notes PDF"]
node_font_files["Prepared Fonts"]

node_learner -->|"requests notes"| node_skill
node_skill -->|"prepares chapter"| node_chapter_content
node_learner -->|"provides course material"| node_chapter_content
node_chapter_content -->|"supplies content"| node_filler
node_templates -->|"provides masters"| node_filler
node_illustrations -->|"provides assets"| node_filler
node_filler -->|"generates PDF"| node_pdf
node_filler -->|"uses layout metrics"| node_layout
node_filler -->|"maps highlights"| node_highlights
node_filler -->|"selects footer text"| node_picker
node_fun_catalog -->|"supplies entries"| node_picker
node_filler -->|"renders editions"| node_templates
node_learner -->|"prepares fonts"| node_font_prep
node_font_prep -->|"produces fonts"| node_font_files
node_learner -.->|"validates plan"| node_book_plan

click node_skill "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/SKILL.md"
click node_chapter_content "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/Resources/content/statistics-chapter.json"
click node_fun_catalog "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/Resources/fun-content/items.jsonl"
click node_templates "https://github.com/congyuemao/university-xueba-notes/tree/main/skills/artifact-template-university-xueba-notes/Resources/templates"
click node_illustrations "https://github.com/congyuemao/university-xueba-notes/tree/main/skills/artifact-template-university-xueba-notes/Resources/illustrations"
click node_filler "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/fill_template.py"
click node_layout "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/pdf_template_layout.py"
click node_highlights "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/context_highlights.py"
click node_picker "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/pick_fun_content.py"
click node_font_prep "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/prepare_fonts.py"
click node_book_plan "https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/validate_book_plan.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill toneBlue
class node_filler,node_layout,node_highlights toneAmber
class node_chapter_content,node_fun_catalog,node_templates,node_illustrations toneMint
class node_picker,node_font_prep,node_book_plan toneRose
class node_learner,node_pdf,node_font_files toneIndigo
```

## Components

### Content Authoring

- [Notes Skill](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/SKILL.md): `skills/artifact-template-university-xueba-notes/SKILL.md`

### PDF Rendering

- [PDF Filler](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/fill_template.py): `skills/artifact-template-university-xueba-notes/scripts/fill_template.py`
- [Layout Metrics](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/pdf_template_layout.py): `skills/artifact-template-university-xueba-notes/scripts/pdf_template_layout.py`
- [Highlight Mapping](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/context_highlights.py): `skills/artifact-template-university-xueba-notes/scripts/context_highlights.py`

### Content Resources

- [Chapter Content](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/Resources/content/statistics-chapter.json): `skills/artifact-template-university-xueba-notes/Resources/content/statistics-chapter.json`
- [Fun Catalog](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/Resources/fun-content/items.jsonl): `skills/artifact-template-university-xueba-notes/Resources/fun-content/items.jsonl`
- [PDF Masters](https://github.com/congyuemao/university-xueba-notes/tree/main/skills/artifact-template-university-xueba-notes/Resources/templates): `skills/artifact-template-university-xueba-notes/Resources/templates`
- [Illustrations](https://github.com/congyuemao/university-xueba-notes/tree/main/skills/artifact-template-university-xueba-notes/Resources/illustrations): `skills/artifact-template-university-xueba-notes/Resources/illustrations`

### Supporting Tools

- [Fun Selector](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/pick_fun_content.py): `skills/artifact-template-university-xueba-notes/scripts/pick_fun_content.py`
- [Font Preparation](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/prepare_fonts.py): `skills/artifact-template-university-xueba-notes/scripts/prepare_fonts.py`
- [Plan Validator](https://github.com/congyuemao/university-xueba-notes/blob/main/skills/artifact-template-university-xueba-notes/scripts/validate_book_plan.py): `skills/artifact-template-university-xueba-notes/scripts/validate_book_plan.py`

### Other components

- **Learner**
- **Notes PDF**
- **Prepared Fonts**

## Connections

- Learner → Notes Skill: requests notes (evidence: `README.md`)
- Notes Skill → Chapter Content: prepares chapter (evidence: `README.md`)
- Learner → Chapter Content: provides course material (evidence: `README.md`)
- Chapter Content → PDF Filler: supplies content (evidence: `README.md`)
- PDF Masters → PDF Filler: provides masters (evidence: `README.md`)
- Illustrations → PDF Filler: provides assets (evidence: `README.md`)
- PDF Filler → Notes PDF: generates PDF (evidence: `README.md`)
- PDF Filler → Layout Metrics: uses layout metrics (evidence: `skills/artifact-template-university-xueba-notes/scripts/fill_template.py`)
- PDF Filler → Highlight Mapping: maps highlights (evidence: `skills/artifact-template-university-xueba-notes/scripts/fill_template.py`)
- PDF Filler → Fun Selector: selects footer text (evidence: `skills/artifact-template-university-xueba-notes/scripts/fill_template.py`)
- Fun Catalog → Fun Selector: supplies entries (evidence: `README.md`)
- PDF Filler → PDF Masters: renders editions (evidence: `README.md`)
- Learner → Font Preparation: prepares fonts (evidence: `README.md`)
- Font Preparation → Prepared Fonts: produces fonts (evidence: `skills/artifact-template-university-xueba-notes/scripts/prepare_fonts.py`)
- Learner → Plan Validator: validates plan
