Studygenerator Agent
Generates accessible study materials (PDFs) for students with learning differences. Reads scanned textbooks with Claude vision, extracts content, and creates dyslexia-friendly PDFs with OpenDyslexic font, mind maps, and step-by-step guides.
StudyGenerator Agent
Accessible study material generator for students with learning differences. Uses Claude vision to read scanned textbooks and generates optimized PDFs.
What This Agent Does
- Reads scanned textbooks using Claude vision built-in
- Extracts and simplifies content for students with learning differences
- Generates accessible PDFs with:
- OpenDyslexic font
- All uppercase text
- Simplified concepts
- Mind maps
- Step-by-step exercise guides
Supported Profiles
This agent generates material for dyslexia profile:
- Large font (14pt+)
- High contrast (black on white/light gray)
- Uppercase text
- Short sentences
- Visual concepts (mind maps)
- Step-by-step guided exercises
Workflow
1. Receive Input
Required input:
- Scanned textbook PDF (local path)
- Topic to cover
- Specific pages (optional)
- Exercises to include (optional)
2. Analyze with Vision
# Claude reads PDF page by page using vision
# Extracts:
# - Titles and subtitles
# - Key concepts
# - Formulas
# - Definitions
# - Exercises
3. Structure Content
For each topic, create:
- Cover page - Title, student name, index
- Overview map - All topics connected
- For each section:
- Simplified summary in concept boxes
- Practical examples
- Mind map
- Exercises:
- Formula reference sheet
- Step-by-step guides
4. Generate Python Script
Create/modify script in testingcase/ based on existing templates:
# Base template: genera_pdf_mario_light.py
# Uses ReportLab with:
# - OpenDyslexic font (if available)
# - Concept boxes
# - Mind maps
# - Exercise guides
5. Execute and Verify
# Run script
python testingcase/genera_pdf_{topic}.py
# Verify output
open ~/Downloads/{OUTPUT_FILE}.pdf
PDF Output Structure
1. COVER PAGE
- Subject title
- Topic
- "Study material for [Student Name]"
- Topic index
2. OVERVIEW MAP
- Central node = main theme
- Branches = sub-topics
- Key formulas visible
3. FOR EACH TOPIC:
a. Section title (large font, underlined)
b. Concept boxes:
- Box title
- Simple bullet points (max 4 per box)
c. Practical example (dashed box)
d. Topic mind map
4. FORMULA REFERENCE
- All formulas large
- Variants (how to find X, how to find K)
5. EXERCISE GUIDES
- Problem text
- "USE THE FORMULA: ..."
- STEP 1, 2, 3, 4
- Final answer box
Python Script Template
#!/usr/bin/env python3
"""
Generate accessible PDF for [STUDENT] - [TOPIC]
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import cm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import black, white, HexColor
import os
# Configuration
OUTPUT_PDF = "~/Downloads/[NAME]_[TOPIC].pdf"
STUDENT = "[NAME]"
TOPIC = "[TOPIC]"
# DSA-friendly colors
LIGHT_GRAY = HexColor("#F5F5F5")
BLACK = black
WHITE = white
# Font (fallback to Helvetica if OpenDyslexic unavailable)
FONT_DIR = os.path.join(os.path.dirname(__file__), "fonts")
try:
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
pdfmetrics.registerFont(TTFont('OpenDyslexic',
os.path.join(FONT_DIR, 'OpenDyslexic-Regular.ttf')))
FONT_NORMAL = 'OpenDyslexic'
FONT_BOLD = 'OpenDyslexic-Bold'
except:
FONT_NORMAL = 'Helvetica'
FONT_BOLD = 'Helvetica-Bold'
# ... helper functions (see genera_pdf_mario_light.py) ...
def main():
c = canvas.Canvas(OUTPUT_PDF, pagesize=A4)
# Generate content
c.save()
print(f"PDF created: {OUTPUT_PDF}")
if __name__ == "__main__":
main()
Available Helper Functions
Scripts in testingcase/ provide these reusable functions:
| Function | Description |
|----------|-------------|
| disegna_titolo_sezione(c, title, y) | Large title with underline |
| disegna_box_concetto(c, title, contents, y) | Gray box with bullet points |
| disegna_esempio(c, text, y) | Dashed box for examples |
| calcola_punto_bordo_ellisse(...) | For mind map connections |
| calcola_punto_bordo_box(...) | For mind map connections |
Invocation
From CLI
# Generate PDF for new topic
claude "Generate accessible PDF for Mario on [TOPIC]
using pages [N-M] from textbook [PATH]"
Full Example
claude "Generate accessible PDF for Mario on KINEMATICS.
Textbook: ~/Downloads/physics_ch5.pdf
Pages: 1-4
Exercises: 81, 83, 85
Required structure:
1. Average velocity
2. Uniform rectilinear motion
3. Acceleration"
Generation Checklist
Before delivering the PDF, verify:
- [ ] Readable font (OpenDyslexic or large Helvetica)
- [ ] All text UPPERCASE
- [ ] Simplified concepts (max 4 bullets per box)
- [ ] Overview map present
- [ ] Mind map for each topic
- [ ] Large, clear formulas
- [ ] Step-by-step exercise guides
- [ ] No walls of text
- [ ] High contrast (black on white/gray)
Related Files
testingcase/genera_pdf_mario.py- Full template with book pagestestingcase/genera_pdf_mario_light.py- Template without book pagestestingcase/fonts/OpenDyslexic-Regular.ttf- DSA font regulartestingcase/fonts/OpenDyslexic-Bold.ttf- DSA font boldtestingcase/fonts/OpenDyslexic-Italic.ttf- DSA font italictestingcase/fonts/AtkinsonHyperlegible-*.ttf- Alternative font (visual impairment)testingcase/genera_pdf_atmosfera.py- Example for another topic
Limitations
- Dyslexia profile only - Other profiles (ADHD, visual, etc.) require MirrorBuddy integration
- Static PDF - Not interactive (no audio, no embedded quizzes)
- Requires Python - To run generated scripts
- Manual vision - Claude reads pages, not automatic OCR
Future Development
Component 2 (MirrorBuddy Integration) will add:
- 7 complete accessibility profiles
- Azure OpenAI GPT-4o for automatic vision
- @react-pdf/renderer (solves OpenDyslexic font in browser)
- Study Kit integration
- Full learning path export