diff --git a/README.md b/README.md
index 2910960..c3c5b72 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,6 @@
# schoolsoft-schema-parser
Parses schoolsoft schedules from 'right_student_schedule.jsp' file into readable json
+
+CURRENTLY REWRITING ENTIRELY, DONT LOOK AT IT :)
+
+document.createElement('script').src = 'http://example.com/file.js';
\ No newline at end of file
diff --git a/grab.js b/grab.js
new file mode 100644
index 0000000..e69de29
diff --git a/output.json b/output.json
index aea98b9..e275d97 100644
--- a/output.json
+++ b/output.json
@@ -1 +1,989 @@
-{"343148": {"name": "ELRELK0", "room": "Sal 14", "starts": "8:30", "ends": "9:45", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22]}, "343234": {"name": "IDRIDR01", "room": "Sal 14", "starts": "8:45", "ends": "10:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51]}, "343142": {"name": "MENTORSTID", "room": "Sal 14", "starts": "9:00", "ends": "9:45", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "343159": {"name": "PRRPRR01", "room": "Sal 13", "starts": "9:05", "ends": "10:20", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23]}, "343120": {"name": "HISHIS01a1", "room": "Sal 3", "starts": "9:20", "ends": "10:35", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 16, 17, 18, 20, 21, 22]}, "343146": {"name": "ENGENG05", "room": "Sal 14", "starts": "9:55", "ends": "11:10", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "343153": {"name": "ELRELK0", "room": "Sal 14", "starts": "9:55", "ends": "11:10", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22]}, "343160": {"name": "SVESVE01", "room": "Sal 3", "starts": "10:40", "ends": "11:55", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23]}, "343145": {"name": "MATMAT01a", "room": "Sal 3", "starts": "10:45", "ends": "12:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23]}, "343139": {"name": "SVESVE01", "room": "Sal 3", "starts": "10:45", "ends": "12:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 16, 17, 18, 20, 21, 22]}, "343144": {"name": "Lunch", "room": "
 | ", "starts": "11:10", "ends": "11:55", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "343158": {"name": "Lunch", "room": "", "starts": "11:20", "ends": "12:05", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22]}, "343155": {"name": "PRRPRR01", "room": "Sal 8", "starts": "12:00", "ends": "13:15", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "343156": {"name": "Lunch", "room": " | ", "starts": "12:00", "ends": "12:45", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23]}, "343147": {"name": "MATMAT01a", "room": "Sal 3", "starts": "12:10", "ends": "13:25", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22]}, "343141": {"name": "Lunch", "room": "", "starts": "12:10", "ends": "12:55", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 16, 17, 18, 20, 21, 22]}, "343157": {"name": "Lunch", "room": "", "starts": "12:15", "ends": "13:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23]}, "343149": {"name": "ENEENE01", "room": "Sal 14", "starts": "12:45", "ends": "14:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23]}, "343154": {"name": "DAODAT01a", "room": "Sal 2", "starts": "13:30", "ends": "14:45", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23]}, "343138": {"name": "ENGENG05", "room": "Sal 3", "starts": "13:35", "ends": "14:50", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22]}, "343294": {"name": "HISHIS01a1", "room": "Sal 3", "starts": "13:45", "ends": "15:00", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "343152": {"name": "ENEENE01", "room": "Sal 14", "starts": "14:10", "ends": "15:25", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23]}, "343143": {"name": "DAODAT01a", "room": "Sal 2", "starts": "14:55", "ends": "16:10", "weeks": [35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 50, 51, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23]}}
\ No newline at end of file
+{
+ "343148": {
+ "name": "ELRELK0",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "8:30",
+ "ends": "9:45",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343234": {
+ "name": "IDRIDR01",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "8:45",
+ "ends": "10:00",
+ "weeks": [
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343142": {
+ "name": "MENTORSTID",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "9:00",
+ "ends": "9:45",
+ "weeks": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343159": {
+ "name": "PRRPRR01",
+ "room": "Sal 13",
+ "day": "",
+ "starts": "9:05",
+ "ends": "10:20",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343120": {
+ "name": "HISHIS01a1",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "9:20",
+ "ends": "10:35",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343146": {
+ "name": "ENGENG05",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "9:55",
+ "ends": "11:10",
+ "weeks": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343153": {
+ "name": "ELRELK0",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "9:55",
+ "ends": "11:10",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343160": {
+ "name": "SVESVE01",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "10:40",
+ "ends": "11:55",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343145": {
+ "name": "MATMAT01a",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "10:45",
+ "ends": "12:00",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343139": {
+ "name": "SVESVE01",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "10:45",
+ "ends": "12:00",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343144": {
+ "name": "Lunch",
+ "room": "",
+ "day": "",
+ "starts": "11:10",
+ "ends": "11:55",
+ "weeks": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343158": {
+ "name": "Lunch",
+ "room": "",
+ "day": "",
+ "starts": "11:20",
+ "ends": "12:05",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343155": {
+ "name": "PRRPRR01",
+ "room": "Sal 8",
+ "day": "",
+ "starts": "12:00",
+ "ends": "13:15",
+ "weeks": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343156": {
+ "name": "Lunch",
+ "room": "",
+ "day": "",
+ "starts": "12:00",
+ "ends": "12:45",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343147": {
+ "name": "MATMAT01a",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "12:10",
+ "ends": "13:25",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343141": {
+ "name": "Lunch",
+ "room": "",
+ "day": "",
+ "starts": "12:10",
+ "ends": "12:55",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343157": {
+ "name": "Lunch",
+ "room": "",
+ "day": "",
+ "starts": "12:15",
+ "ends": "13:00",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343149": {
+ "name": "ENEENE01",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "12:45",
+ "ends": "14:00",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343154": {
+ "name": "DAODAT01a",
+ "room": "Sal 2",
+ "day": "",
+ "starts": "13:30",
+ "ends": "14:45",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343138": {
+ "name": "ENGENG05",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "13:35",
+ "ends": "14:50",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 20,
+ 21,
+ 22,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343294": {
+ "name": "HISHIS01a1",
+ "room": "Sal 3",
+ "day": "",
+ "starts": "13:45",
+ "ends": "15:00",
+ "weeks": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343152": {
+ "name": "ENEENE01",
+ "room": "Sal 14",
+ "day": "",
+ "starts": "14:10",
+ "ends": "15:25",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 46,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ },
+ "343143": {
+ "name": "DAODAT01a",
+ "room": "Sal 2",
+ "day": "",
+ "starts": "14:55",
+ "ends": "16:10",
+ "weeks": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 10,
+ 11,
+ 12,
+ 13,
+ 15,
+ 16,
+ 17,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 35,
+ 36,
+ 37,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 45,
+ 47,
+ 48,
+ 49,
+ 50,
+ 51
+ ]
+ }
+}
\ No newline at end of file
diff --git a/parser.py b/parser.py
index 1113e08..ffa864f 100644
--- a/parser.py
+++ b/parser.py
@@ -1,28 +1,19 @@
import sys
import json
-inputFile = ''
-outputFile = ''
-
-outputContent = {}
-
# Super janky script to parse right_student_schedule.jsp and save as readable json
-def getInput():
-
- global inputFile, outputFile
-
- inputFile = input("Input file: ")
- outputFile = input("Output file: ")
-
def main():
- global inputFile, outputFile
-
- # Set input and output file if not specified
- if inputFile == '': inputFile = 'right_student_schedule.jsp'
- if outputFile == '': outputFile = 'output.json'
+ outputContent = {}
+ try:
+ inputFile = sys.argv[0]
+ outputFile = sys.argv[1]
+ except:
+ inputFile = 'right_student_schedule.jsp'
+ outputFile = 'output.json'
+
with open(inputFile,'r') as f:
line = 0 # Start at line 0
@@ -58,6 +49,8 @@ def main():
weeks.append(n)
else: # If not a range, just add the week
weeks.append(int(y))
+
+ weeks.sort()
# Extract lesson ID
@@ -97,10 +90,13 @@ def main():
room = x[sectionStartIndex:sectionEndIndex].strip('\n')
+ if name == 'Lunch': room = '' # Prevent weird extraction of non-existent lunch room
+
# Add all extracted values to entry
entry['name'] = name
entry['room'] = room
+ entry['day'] = "" # No idea how to do this
entry['starts'] = classStart
entry['ends'] = classEnd
entry['weeks'] = weeks
@@ -110,16 +106,11 @@ def main():
f.close()
with open(outputFile, 'w') as file:
- json.dump(outputContent, file)
+ json.dump(outputContent, file, indent=4)
if __name__ == '__main__':
- getInput()
-else:
- inputFile = sys.argv[0]
- outputFile = sys.argv[1]
-
-main()
\ No newline at end of file
+ main()
\ No newline at end of file