How isaknyberg/kth-gpa-calculator works
KTH GPA Calculator is a browser-based tool for parsing a Ladok transcript PDF, calculating KTH GPA, and letting users adjust courses and export results. Its main workflow is upload or drop PDF → extract course rows → manage and grade courses → display GPA and credits. The README also promises local-only processing and simulation by adding or editing courses. The sampled sources show these core interactions; the separate Swedish and English pages are not mapped because their runtime wiring was not shown.
Main entry points: script.js Upload and parsing · CourseList.js Course collection · Course.js Course model
Components 11
Transcript workflow
- Upload and parsing
script.js
Course and GPA
- Course model
Course.js - Course collection
CourseList.js - Grade tables
script.js - GPA and credits
CourseList.js
Results interface
- Editable course table
script.js - GPA summary
script.js - CSV download
script.js
Other components
- User
- Ladok PDF
- PDF.js
Connections 14
- User → Upload and parsing: selects file
script.js - Ladok PDF → Upload and parsing: provides PDF
script.js - Upload and parsing → PDF.js: loads document
script.js - Upload and parsing → Course model: creates parsed courses
script.js - Upload and parsing → Course collection: builds collection
script.js - Course collection → Course model: adds and grades
CourseList.js - Course collection → Grade tables: applies grading
script.js - Course collection → GPA and credits: calculates
CourseList.js - Upload and parsing → Editable course table: renders courses
script.js - Editable course table → GPA and credits: updates course inclusion
script.js - GPA and credits → GPA summary: supplies totals
script.js - User → Editable course table: edits courses
script.js - User → CSV download: requests export
script.js - CSV download → Course collection: serializes courses
script.js