Generate a printable school/class schedule (weekly timetable) as a PDF from CSV data, using Typst.
Given a CSV of lessons, a list of bell times, and a list of weekday names, this project renders a clean table-based schedule like the one in example.pdf.
-
Typst CLI installed and available on your
PATH.Install via Homebrew:
brew install typst
Or see the Typst installation guide for other platforms.
main.typ Main Typst document — layout, styling, and rendering logic
data/
example.csv Example lesson data (day, lesson number, subject)
bells.txt Lesson time slots, one per line, indexed from 0
weekdays.txt Weekday names, one per line, in Monday–Friday order
example.pdf Rendered output of the example data
A CSV file with a header row and the columns:
| column | meaning |
|---|---|
day |
weekday number, 1 = Monday … 5 = Friday |
lesson |
lesson number for that day (matches a line index in bells.txt, 0-based) |
subject |
text shown in the cell (subject name, room, etc.) |
day,lesson,subject
1,0,TAW
1,1,TAW
1,2,TAW
1,3,Hiszpański
...Not every day needs every lesson number — empty slots are simply left blank in the table.
One line per lesson, giving the time range shown in the leftmost column. The line at index n (0-based) is the time slot for lesson value n in the CSV.
07:10 - 07:55
08:00 - 08:45
08:55 - 09:40
...
Exactly 5 lines, the header labels for Monday through Friday:
Poniedziałek
Wtorek
Środa
Czwartek
Piątek
Compile the default example (data/example.csv, 2 copies on the page) to a PDF:
typst compile main.typ output.pdfPass a different CSV path via the schedule input:
typst compile --input schedule=data/my-schedule.csv main.typ output.pdfThe count input controls how many copies of the schedule are stacked on the page (useful for printing the same schedule twice per sheet). It defaults to 2:
typst compile --input schedule=data/my-schedule.csv --input count=1 main.typ output.pdftypst watch main.typ output.pdfThis recompiles automatically whenever main.typ or the data files change.
Colors, fonts, and table styling are configured near the top of main.typ:
theme-color— base color the header/accent colors are derived fromtext(font: ..., size: ...)— document font and sizetable(...)— borders, padding, and cell fill rules
Edit these values directly in main.typ to change the appearance.