Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Last active June 24, 2024 23:03
Show Gist options
  • Save ErykDarnowski/a94fa5e181319ef44b23c0d15e8c2856 to your computer and use it in GitHub Desktop.
Save ErykDarnowski/a94fa5e181319ef44b23c0d15e8c2856 to your computer and use it in GitHub Desktop.
USOS print list of courses to console

USOS print list of courses to console

This little script works for both ordinary and part time timetables + has a bunch of cool QoL features ;)
(It displays the nicer timetable under the original one)

Instructions

  1. Go to your courses page (for me its: https://usosweb.ansb.pl/kontroler.php?_action=dla_stud/studia/oceny/index)
  2. Open the browser Dev Tools F12
  3. Paste in the code:
let term_num = 1; // looks like it goes from most recent to oldest like so: 1 -> n
console.log([...document.querySelectorAll(`#tab${term_num} > tr > td > a`)].map(x => x.innerText).join('\n'));
  1. Change the term_num to select the term you're interested in (by default it will print the current one)
  2. Press Enter to run the code
  3. Copy the output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment