Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schedule Typst

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.

Requirements

  • Typst CLI installed and available on your PATH.

    Install via Homebrew:

    brew install typst

    Or see the Typst installation guide for other platforms.

Project structure

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

Data format

data/example.csv (or your own schedule file)

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.

data/bells.txt

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
...

data/weekdays.txt

Exactly 5 lines, the header labels for Monday through Friday:

Poniedziałek
Wtorek
Środa
Czwartek
Piątek

Usage

Compile the default example (data/example.csv, 2 copies on the page) to a PDF:

typst compile main.typ output.pdf

Using your own schedule

Pass a different CSV path via the schedule input:

typst compile --input schedule=data/my-schedule.csv main.typ output.pdf

Changing how many copies are printed

The 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.pdf

Live preview while editing

typst watch main.typ output.pdf

This recompiles automatically whenever main.typ or the data files change.

Customizing the look

Colors, fonts, and table styling are configured near the top of main.typ:

  • theme-color — base color the header/accent colors are derived from
  • text(font: ..., size: ...) — document font and size
  • table(...) — borders, padding, and cell fill rules

Edit these values directly in main.typ to change the appearance.

About

Generate a printable school/class schedule (weekly timetable)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages