From 0b092b569a41f632954b37b69508d3715c059f7d Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Feb 2025 15:42:55 -0600 Subject: [PATCH 01/34] Testing tutors form - may not work --- src/content/StudentServices/tutors.ts | 955 +++++++++++++------------- 1 file changed, 482 insertions(+), 473 deletions(-) diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index e88ec0d..f8e6c03 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -1,3 +1,9 @@ +import * as fs from 'fs'; + +// Read the file +const jsonString = fs.readFileSync('path/to/file.json', 'utf-8'); +console.log(jsonString) + type Tutor = { name: string; email: string; @@ -7,478 +13,481 @@ type Tutor = { courses: string; }; -export const tutors: Tutor[] = [ - // { - // name: "Grant Mckechnie", - // email: "granttm2@illinois.edu", - // courses: "ECE 110, ECE 120", - // }, - // { - // name: "Alex Zhang", - // email: "alexmz2@illinois.edu", - // courses: - // "ECE374, CS374, ECE 110, ECE 210, ECE313, ECE220, ECE 120, PHYS 211", - // }, + +export const tutors: Tutor[] = JSON.parse(jsonString) as Tutor[]; + +// export const tutors: Tutor[] = [ +// // { +// // name: "Grant Mckechnie", +// // email: "granttm2@illinois.edu", +// // courses: "ECE 110, ECE 120", +// // }, +// // { +// // name: "Alex Zhang", +// // email: "alexmz2@illinois.edu", +// // courses: +// // "ECE374, CS374, ECE 110, ECE 210, ECE313, ECE220, ECE 120, PHYS 211", +// // }, - { - name: "Bex Muise", - email: "rmuise2@illinois.edu", - courses: "ECE 120, ECE 220, ECE 310, ECE 342, CS 173, CS 225", - }, - { - name: "Eisa Kamran", - email: "ekamr2@illinois.edu", - courses: "ECE 120, ECE 220", - }, - // { - // name: "Udit Pai", - // email: "upai3@illinois.edu", - // courses: "ECE 120", - // }, - { - name: "Taowei Huang", - email: "taoweih2@illinois.edu", - courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, MATH 257", - }, - { - name: "Albus Lai", - email: "albusl2@illinois.edu", - courses: "ECE 120, ECE 210, ECE 220, ECE 329, PHYS 214, MATH 257, MATH 285", - }, - // { - // name: "David Thomas", - // email: "davidvt2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220", - // }, - // { - // name: "Xavier Routh", - // email: "xrouth2@illinois.edu", - // courses: "ECE 220, CS 173, CS 225", - // }, - { - name: "Lucas Nguyen", - email: "lnguy7@illinois.edu", - courses: "ECE 310, ECE 374, ECE 438", - }, - // { - // name: "Aidan Rodgers", - // email: "aidanfr2@illinois.edu", - // courses: "ECE 330, ECE 342", - // }, - { - name: "Kyle Chung", - email: "kbchung2@illinois.edu", - courses: "ECE 210, ECE 220, ECE 310, ECE 374, MATH 221, PHYS 211, CS 173, CS 225", - }, - // { - // name: "Evan Schmitz", - // email: "evanls3@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 342", - // }, - // { - // name: "David Zheng", - // email: "davidz7@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 213, PHYS 214, MATH 285", - // }, - // { - // name: "Pradyun Narkadamilli", - // email: "pradyun2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, ECE 342, MATH 257, MATH 285, CS 173, CS 225, ECE 391, ECE482, ECE411", - // }, - // { - // name: "Ethan Chastain", - // email: "ecc5@illinois.edu", - // courses: "ECE 329, ECE 340, ECE 342, ECE 486, ECE 489, PHYS 212, PHYS 213, PHYS 214, CS 225, MATH 257", - // }, - { - name: "Nestor Gutierrez", - email: "nguti4@illinois.edu", - courses: "ECE 342", - }, - // { - // name: "Sreeram Rave", - // email: "srave2@illinois.edu", - // courses: "ECE 120, ECE 220", - // }, - // { - // name: "Daron Sun", - // email: "daronls2@illinois.edu", - // courses: "ECE 110, PHYS 213, PHYS 214, MATH 241, MATH 257", - // }, - // { - // name: "Emre Tan Anik", - // email: "emreta2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, MATH 241, MATH 285", - // }, - // { - // name: "Ayush Mehendale", - // email: "ayushtm2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, MATH 257, MATH 285, ME 170, TAM 210, ME 270", - // }, - // { - // name: "Eric Ho", - // email: "erich11@illinois.edu", - // courses: "ECE 120, ECE 220, PHYS 212, MATH 241", - // }, - // { - // name: "Vasunandan Dar", - // email: "vdar2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, MATH 257, MATH 285, CS 173", - // }, - // { - // name: "Oscar Li", - // email: "hongyil9@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, PHYS 213, PHYS 214, MATH 241", - // }, - // { - // name: "Ayush Barik", - // email: "barik2@illinois.edu", - // courses: "ECE 120, ECE 220, MATH 257", - // }, - // { - // name: "Yubo Wu", - // email: "yubowu2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210", - // }, - // { - // name: "Jonathan Sengstock", - // email: "jms32@illinois.edu", - // courses: "ECE 110, ECE 330, ECE 333, PHYS 212", - // }, - // { - // name: "Adrian Bahar", - // email: "adbahar2@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211", - // }, - // { - // name: "John Bledsoe", - // email: "johndb3@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173", - // }, - // { - // name: "Abhay Harpalani", - // email: "abhayh2@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211, CS 173", - // }, - { - name: "Sohum Bhan", - email: "sohumb3@illinois.edu", - courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285", - }, - // { - // name: "Sid Rau", - // email: "sidrau2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231", - // }, - // { - // name: "Lauren Ruan", - // email: "lruan5@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211", - // }, - // { - // name: "Anjali Thomas", - // email: "anjalit3@illinois.edu", - // courses: "ECE 120, ECE 110, PHYS 211, PHYS 212, PHYS 214, MATH 231", - // }, - // { - // name: "Bhavya Agrawal", - // email: "bhavyaa2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 257, MATH 285", - // }, - // { - // name: "Alex Chirita", - // email: "chirita2@illinois.edu", - // courses: "ECE 210, ECE 220", - // }, - // { - // name: "Leo Lin", - // email: "leolin3@illinois.edu", - // courses: "ECE 110, ECE 120, MATH 257, CS 173, CS 225", - // }, - // { - // name: "Matthew Wu", - // email: "mzwu3@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211, MATH 241", - // }, - // { - // name: "Hausen Wu", - // email: "hausenw2@illinois.edu", - // courses: "ECE 110", - // }, - // { - // name: "Pete Sanguanchua", - // email: "ps96@illinois.edu", - // courses: "ECE 110, ECE 210, PHYS 211, PHYS 212, PHYS 213, PHYS 214", - // }, - // { - // name: "Duc Nguyen", - // email: "ducmn2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, MATH 285, Math 416, math 347", - // }, - { - name: "Rithwik Rayani ", - email: "rrayani2@illinois.edu", - courses: "ECE 329, ECE 340, ECE 342, PHYS 214, MATH 241, MATH 257, MATH 285", - }, - // { - // name: "Cher Rui Tan", - // email: "cherrui2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 211, PHYS 212, MATH 231, MATH 241, MATH 257, MATH 285, CS 225", - // }, - // { - // name: "Robert Zhu", - // email: "robertz4@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 329, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257", - // }, - // { - // name: "Lawrence Cheng", - // email: "lrcheng2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 257, CS 173", - // }, - // { - // name: "Anjali Thomas", - // email: "anjalit3@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212, MATH 231, MATH 241", - // }, - // { - // name: "Xainab Khan", - // email: "xkhan2@illinois.edu", - // courses: "ECE 120, PHYS 211, MATH 221, MATH 231, MATH 285, CHEM 102", - // }, - // { - // name: "Kunal Jain", - // email: "kunal6@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 285, CS 173, CS 225", - // }, - { - name: "Anthony Salemi", - email: "asalemi3@illinois.edu", - courses: "ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 257", - }, - // { - // name: "Kush Shah", - // email: "kshah236@illinois.edu", - // courses: "ECE 110, ECE 210, ECE 330, ECE 342, PHYS 212, PHYS 213", - // }, - // { - // name: "Erin Rothenbaum", - // email: "eroth8@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 257, MATH 285", - // }, - // { - // name: "Bryce Mikos", - // email: "bmikos2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241, MATH 257", - // }, - // { - // name: "Max Bromberg", - // email: "mbrom3@illinois.edu", - // courses: "ECE 220, CS 225", - // }, - // { - // name: "Rohit Iyer", - // email: "rohiti2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211", - // }, - // { - // name: "Marco Frigo", - // email: "mfrigo3@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, PHYS 212, CS 225", - // }, - // { - // name: "Yash Thakker", - // email: "ythak2@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241", - // }, - // { - // name: "Sidarth Raman", - // email: "ssraman2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220", - // }, - { - name: "Sohithesh Chevireddy", - email: "src15@illinois.edu", - courses: "ECE 110, ECE 210", - }, - // { - // name: "Keehan Tsai ", - // email: "keehant2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214", - // }, - // { - // name: "Carson Conquest", - // email: "carsonc4@illinois.edu", - // courses: "ECE 210, PHYS 211, PHYS 212, CS 173", - // }, - // { - // name: "Anna Wilkowski", - // email: "annaw7@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220", - // }, - // { - // name: "Gabriel Inojosa", - // email: "gvi2@illinois.edu", - // courses: "ECE 329, ECE 350, PHYS 212, MATH 285", - // }, - // { - // name: "Sophie Yang", - // email: "styang3@illinois.edu", - // courses: "ECE 120, PHYS 212, MATH 241", - // }, - // { - // name: "Caroline Chang", - // email: "ccchang9@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 212", - // }, - // { - // name: "Meenakshi De", - // email: "mde6@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 211, PHYS 214, MATH 221, MATH 241", - // } - // { - // name: "Rohan Shah", - // email: "rohan11@illinois.edu", - // courses: "ECE 110, PHYS 211, MATH 285", - // }, - // { - // name: "Zhenbo Chen", - // email: "zhenboc2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 231, MATH 241, MATH 257, MATH 285, CS 173, CS 225, ECE408", - // }, - // { - // name: "Sushrut Warekar", - // email: "sware8@illinois.edu", - // courses: "ECE 110, ECE 120, PHYS 214, MATH 231", - // }, - // { - // name: "Sehwa Jung", - // email: "sehwaj2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, MATH 285", - // }, - // { - // name: "Jay Lee", - // email: "deurotemy3141", - // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212", - // }, - // { - // name: "Rohan Dad", - // email: "rohan24@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, MATH 241, MATH 257", - // }, - // { - // name: "Matthew Trela", - // email: "mtrela2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, CS 225", - // }, - // { - // name: "Sourojit Mazumder", - // email: "skm7@illinois.edu", - // courses: "ECE 110, ECE 210", - // }, - // { - // name: "Aarushi Aggrwal", - // email: "aggrwal3@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 374, PHYS 211, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173, CS 225", - // }, +// { +// name: "Bex Muise", +// email: "rmuise2@illinois.edu", +// courses: "ECE 120, ECE 220, ECE 310, ECE 342, CS 173, CS 225", +// }, +// { +// name: "Eisa Kamran", +// email: "ekamr2@illinois.edu", +// courses: "ECE 120, ECE 220", +// }, +// // { +// // name: "Udit Pai", +// // email: "upai3@illinois.edu", +// // courses: "ECE 120", +// // }, +// { +// name: "Taowei Huang", +// email: "taoweih2@illinois.edu", +// courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, MATH 257", +// }, +// { +// name: "Albus Lai", +// email: "albusl2@illinois.edu", +// courses: "ECE 120, ECE 210, ECE 220, ECE 329, PHYS 214, MATH 257, MATH 285", +// }, +// // { +// // name: "David Thomas", +// // email: "davidvt2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220", +// // }, +// // { +// // name: "Xavier Routh", +// // email: "xrouth2@illinois.edu", +// // courses: "ECE 220, CS 173, CS 225", +// // }, +// { +// name: "Lucas Nguyen", +// email: "lnguy7@illinois.edu", +// courses: "ECE 310, ECE 374, ECE 438", +// }, +// // { +// // name: "Aidan Rodgers", +// // email: "aidanfr2@illinois.edu", +// // courses: "ECE 330, ECE 342", +// // }, +// { +// name: "Kyle Chung", +// email: "kbchung2@illinois.edu", +// courses: "ECE 210, ECE 220, ECE 310, ECE 374, MATH 221, PHYS 211, CS 173, CS 225", +// }, +// // { +// // name: "Evan Schmitz", +// // email: "evanls3@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 342", +// // }, +// // { +// // name: "David Zheng", +// // email: "davidz7@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 213, PHYS 214, MATH 285", +// // }, +// // { +// // name: "Pradyun Narkadamilli", +// // email: "pradyun2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, ECE 342, MATH 257, MATH 285, CS 173, CS 225, ECE 391, ECE482, ECE411", +// // }, +// // { +// // name: "Ethan Chastain", +// // email: "ecc5@illinois.edu", +// // courses: "ECE 329, ECE 340, ECE 342, ECE 486, ECE 489, PHYS 212, PHYS 213, PHYS 214, CS 225, MATH 257", +// // }, +// { +// name: "Nestor Gutierrez", +// email: "nguti4@illinois.edu", +// courses: "ECE 342", +// }, +// // { +// // name: "Sreeram Rave", +// // email: "srave2@illinois.edu", +// // courses: "ECE 120, ECE 220", +// // }, +// // { +// // name: "Daron Sun", +// // email: "daronls2@illinois.edu", +// // courses: "ECE 110, PHYS 213, PHYS 214, MATH 241, MATH 257", +// // }, +// // { +// // name: "Emre Tan Anik", +// // email: "emreta2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, MATH 241, MATH 285", +// // }, +// // { +// // name: "Ayush Mehendale", +// // email: "ayushtm2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, MATH 257, MATH 285, ME 170, TAM 210, ME 270", +// // }, +// // { +// // name: "Eric Ho", +// // email: "erich11@illinois.edu", +// // courses: "ECE 120, ECE 220, PHYS 212, MATH 241", +// // }, +// // { +// // name: "Vasunandan Dar", +// // email: "vdar2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, MATH 257, MATH 285, CS 173", +// // }, +// // { +// // name: "Oscar Li", +// // email: "hongyil9@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, PHYS 213, PHYS 214, MATH 241", +// // }, +// // { +// // name: "Ayush Barik", +// // email: "barik2@illinois.edu", +// // courses: "ECE 120, ECE 220, MATH 257", +// // }, +// // { +// // name: "Yubo Wu", +// // email: "yubowu2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210", +// // }, +// // { +// // name: "Jonathan Sengstock", +// // email: "jms32@illinois.edu", +// // courses: "ECE 110, ECE 330, ECE 333, PHYS 212", +// // }, +// // { +// // name: "Adrian Bahar", +// // email: "adbahar2@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211", +// // }, +// // { +// // name: "John Bledsoe", +// // email: "johndb3@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173", +// // }, +// // { +// // name: "Abhay Harpalani", +// // email: "abhayh2@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211, CS 173", +// // }, +// { +// name: "Sohum Bhan", +// email: "sohumb3@illinois.edu", +// courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285", +// }, +// // { +// // name: "Sid Rau", +// // email: "sidrau2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231", +// // }, +// // { +// // name: "Lauren Ruan", +// // email: "lruan5@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211", +// // }, +// // { +// // name: "Anjali Thomas", +// // email: "anjalit3@illinois.edu", +// // courses: "ECE 120, ECE 110, PHYS 211, PHYS 212, PHYS 214, MATH 231", +// // }, +// // { +// // name: "Bhavya Agrawal", +// // email: "bhavyaa2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 257, MATH 285", +// // }, +// // { +// // name: "Alex Chirita", +// // email: "chirita2@illinois.edu", +// // courses: "ECE 210, ECE 220", +// // }, +// // { +// // name: "Leo Lin", +// // email: "leolin3@illinois.edu", +// // courses: "ECE 110, ECE 120, MATH 257, CS 173, CS 225", +// // }, +// // { +// // name: "Matthew Wu", +// // email: "mzwu3@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211, MATH 241", +// // }, +// // { +// // name: "Hausen Wu", +// // email: "hausenw2@illinois.edu", +// // courses: "ECE 110", +// // }, +// // { +// // name: "Pete Sanguanchua", +// // email: "ps96@illinois.edu", +// // courses: "ECE 110, ECE 210, PHYS 211, PHYS 212, PHYS 213, PHYS 214", +// // }, +// // { +// // name: "Duc Nguyen", +// // email: "ducmn2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, MATH 285, Math 416, math 347", +// // }, +// { +// name: "Rithwik Rayani ", +// email: "rrayani2@illinois.edu", +// courses: "ECE 329, ECE 340, ECE 342, PHYS 214, MATH 241, MATH 257, MATH 285", +// }, +// // { +// // name: "Cher Rui Tan", +// // email: "cherrui2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 211, PHYS 212, MATH 231, MATH 241, MATH 257, MATH 285, CS 225", +// // }, +// // { +// // name: "Robert Zhu", +// // email: "robertz4@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 329, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257", +// // }, +// // { +// // name: "Lawrence Cheng", +// // email: "lrcheng2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 257, CS 173", +// // }, +// // { +// // name: "Anjali Thomas", +// // email: "anjalit3@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212, MATH 231, MATH 241", +// // }, +// // { +// // name: "Xainab Khan", +// // email: "xkhan2@illinois.edu", +// // courses: "ECE 120, PHYS 211, MATH 221, MATH 231, MATH 285, CHEM 102", +// // }, +// // { +// // name: "Kunal Jain", +// // email: "kunal6@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 285, CS 173, CS 225", +// // }, +// { +// name: "Anthony Salemi", +// email: "asalemi3@illinois.edu", +// courses: "ECE 120, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 257", +// }, +// // { +// // name: "Kush Shah", +// // email: "kshah236@illinois.edu", +// // courses: "ECE 110, ECE 210, ECE 330, ECE 342, PHYS 212, PHYS 213", +// // }, +// // { +// // name: "Erin Rothenbaum", +// // email: "eroth8@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 257, MATH 285", +// // }, +// // { +// // name: "Bryce Mikos", +// // email: "bmikos2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241, MATH 257", +// // }, +// // { +// // name: "Max Bromberg", +// // email: "mbrom3@illinois.edu", +// // courses: "ECE 220, CS 225", +// // }, +// // { +// // name: "Rohit Iyer", +// // email: "rohiti2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211", +// // }, +// // { +// // name: "Marco Frigo", +// // email: "mfrigo3@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, PHYS 212, CS 225", +// // }, +// // { +// // name: "Yash Thakker", +// // email: "ythak2@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212, MATH 221, MATH 231, MATH 241", +// // }, +// // { +// // name: "Sidarth Raman", +// // email: "ssraman2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220", +// // }, +// { +// name: "Sohithesh Chevireddy", +// email: "src15@illinois.edu", +// courses: "ECE 110, ECE 210", +// }, +// // { +// // name: "Keehan Tsai ", +// // email: "keehant2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214", +// // }, +// // { +// // name: "Carson Conquest", +// // email: "carsonc4@illinois.edu", +// // courses: "ECE 210, PHYS 211, PHYS 212, CS 173", +// // }, +// // { +// // name: "Anna Wilkowski", +// // email: "annaw7@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220", +// // }, +// // { +// // name: "Gabriel Inojosa", +// // email: "gvi2@illinois.edu", +// // courses: "ECE 329, ECE 350, PHYS 212, MATH 285", +// // }, +// // { +// // name: "Sophie Yang", +// // email: "styang3@illinois.edu", +// // courses: "ECE 120, PHYS 212, MATH 241", +// // }, +// // { +// // name: "Caroline Chang", +// // email: "ccchang9@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 212", +// // }, +// // { +// // name: "Meenakshi De", +// // email: "mde6@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 211, PHYS 214, MATH 221, MATH 241", +// // } +// // { +// // name: "Rohan Shah", +// // email: "rohan11@illinois.edu", +// // courses: "ECE 110, PHYS 211, MATH 285", +// // }, +// // { +// // name: "Zhenbo Chen", +// // email: "zhenboc2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 231, MATH 241, MATH 257, MATH 285, CS 173, CS 225, ECE408", +// // }, +// // { +// // name: "Sushrut Warekar", +// // email: "sware8@illinois.edu", +// // courses: "ECE 110, ECE 120, PHYS 214, MATH 231", +// // }, +// // { +// // name: "Sehwa Jung", +// // email: "sehwaj2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 211, MATH 285", +// // }, +// // { +// // name: "Jay Lee", +// // email: "deurotemy3141", +// // courses: "ECE 110, ECE 120, PHYS 211, PHYS 212", +// // }, +// // { +// // name: "Rohan Dad", +// // email: "rohan24@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, MATH 241, MATH 257", +// // }, +// // { +// // name: "Matthew Trela", +// // email: "mtrela2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, PHYS 213, PHYS 214, CS 225", +// // }, +// // { +// // name: "Sourojit Mazumder", +// // email: "skm7@illinois.edu", +// // courses: "ECE 110, ECE 210", +// // }, +// // { +// // name: "Aarushi Aggrwal", +// // email: "aggrwal3@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 374, PHYS 211, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173, CS 225", +// // }, - // { - // name: "Ansley Tsai", - // email: "ansleyt2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220", - // }, - // { - // name: "Justin Wu", - // email: "jwu246@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 213, PHYS 214, MATH 241, MATH 285, CS 225", - // }, - // { - // name: "Saipranav Venkatakrishnan", - // email: "sv34@illinois.edu", - // courses: "ECE 210, ECE 220", - // }, - // { - // name: "Eric Vo", - // email: "ericvo@illinois.edu", - // courses: "ECE 110, ECE 210, ECE 220, ECE 313, MATH 257, MATH 285, CS 225", - // }, - // { - // name: "Colby Steber", - // email: "csteber2@illinois.edu", - // courses: "ECE 110, ECE 120", - // }, - // { - // name: "Jason Yan", - // email: "zexuany2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 220, MATH 241, MATH 257, CS 225", - // }, - // { - // name: "Eddie Dzieza", - // email: "edzie3@illinois.edu", - // courses: "ECE 120, ECE 220", - // }, - // { - // name: "Jefferson Zhang", - // email: "jyz4@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 385", - // }, - // { - // name: "Johail Gerard", - // email: "johailg2@illinois.edu", - // courses: "ECE 110, ECE 210, ECE 313, MATH 257, CS 173", - // }, - // { - // name: "Alexander Maiorov", - // email: "maiorov2@illinois.edu", - // courses: "ECE 210, ECE 310, ECE 313, ECE 329", - // }, - // { - // name: "Steffen Brown", - // email: "sbrown16@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173", - // }, - // { - // name: "Sam Cheung", - // email: "sambc2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, MATH 257, MATH 285, CS 173", - // }, - // { - // name: "Sairaj Shetye", - // email: "sshetye2@illinois.edu", - // courses: "ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, CS 225", - // }, - // { - // name: "Kelly Chang", - // email: "kellyhc2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, ECE 342, CS 225", - // }, - // { - // name: "Hongyi Jiang", - // email: "hongyi9@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 285, CS 173, CS 225", - // }, - // { - // name: "Matthew Guibord", - // email: "guibord2@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 310, ECE 329, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285", - // }, - // { - // name: "Jitao Li", - // email: "jitaoli2@illinois.edu", - // courses: "ECE 313, CS 225", - // }, - // { - // name: "David Song", - // email: "djsong3@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 313, ECE 329, ECE 342, PHYS 211, PHYS 212, PHYS 213, PHYS 214", - // }, - // { - // name: "Qiran Pang", - // email: "qpang2@illinois.edu", - // courses: "ECE 120, ECE 220, PHYS 213, PHYS 214, CS 225", - // }, - // { - // name: "Dhruv Dilbaghi", - // email: "dhruvd4@illinois.edu", - // courses: "ECE 110, ECE 120, ECE 210, ECE 342", - // } -]; +// // { +// // name: "Ansley Tsai", +// // email: "ansleyt2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220", +// // }, +// // { +// // name: "Justin Wu", +// // email: "jwu246@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 213, PHYS 214, MATH 241, MATH 285, CS 225", +// // }, +// // { +// // name: "Saipranav Venkatakrishnan", +// // email: "sv34@illinois.edu", +// // courses: "ECE 210, ECE 220", +// // }, +// // { +// // name: "Eric Vo", +// // email: "ericvo@illinois.edu", +// // courses: "ECE 110, ECE 210, ECE 220, ECE 313, MATH 257, MATH 285, CS 225", +// // }, +// // { +// // name: "Colby Steber", +// // email: "csteber2@illinois.edu", +// // courses: "ECE 110, ECE 120", +// // }, +// // { +// // name: "Jason Yan", +// // email: "zexuany2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 220, MATH 241, MATH 257, CS 225", +// // }, +// // { +// // name: "Eddie Dzieza", +// // email: "edzie3@illinois.edu", +// // courses: "ECE 120, ECE 220", +// // }, +// // { +// // name: "Jefferson Zhang", +// // email: "jyz4@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 385", +// // }, +// // { +// // name: "Johail Gerard", +// // email: "johailg2@illinois.edu", +// // courses: "ECE 110, ECE 210, ECE 313, MATH 257, CS 173", +// // }, +// // { +// // name: "Alexander Maiorov", +// // email: "maiorov2@illinois.edu", +// // courses: "ECE 210, ECE 310, ECE 313, ECE 329", +// // }, +// // { +// // name: "Steffen Brown", +// // email: "sbrown16@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 313, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285, CS 173", +// // }, +// // { +// // name: "Sam Cheung", +// // email: "sambc2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, MATH 257, MATH 285, CS 173", +// // }, +// // { +// // name: "Sairaj Shetye", +// // email: "sshetye2@illinois.edu", +// // courses: "ECE 210, ECE 220, PHYS 211, PHYS 212, PHYS 213, PHYS 214, CS 225", +// // }, +// // { +// // name: "Kelly Chang", +// // email: "kellyhc2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313, ECE 342, CS 225", +// // }, +// // { +// // name: "Hongyi Jiang", +// // email: "hongyi9@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 220, PHYS 211, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 285, CS 173, CS 225", +// // }, +// // { +// // name: "Matthew Guibord", +// // email: "guibord2@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 310, ECE 329, PHYS 211, PHYS 212, PHYS 213, PHYS 214, MATH 221, MATH 231, MATH 241, MATH 257, MATH 285", +// // }, +// // { +// // name: "Jitao Li", +// // email: "jitaoli2@illinois.edu", +// // courses: "ECE 313, CS 225", +// // }, +// // { +// // name: "David Song", +// // email: "djsong3@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 313, ECE 329, ECE 342, PHYS 211, PHYS 212, PHYS 213, PHYS 214", +// // }, +// // { +// // name: "Qiran Pang", +// // email: "qpang2@illinois.edu", +// // courses: "ECE 120, ECE 220, PHYS 213, PHYS 214, CS 225", +// // }, +// // { +// // name: "Dhruv Dilbaghi", +// // email: "dhruvd4@illinois.edu", +// // courses: "ECE 110, ECE 120, ECE 210, ECE 342", +// // } +// ]; From 077f4c0a99988c1f39b1c751b1e5163d80374e4e Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 16 Feb 2025 17:39:49 -0600 Subject: [PATCH 02/34] tutors automation testing --- src/content/StudentServices/fetchTutors.py | 46 ++++++++++++++++++++ src/content/StudentServices/tutors.ts | 2 +- src/content/StudentServices/tutors_list.json | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/content/StudentServices/fetchTutors.py create mode 100644 src/content/StudentServices/tutors_list.json diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py new file mode 100644 index 0000000..41c5405 --- /dev/null +++ b/src/content/StudentServices/fetchTutors.py @@ -0,0 +1,46 @@ +import json +from google.oauth2.service_account import Credentials +from googleapiclient.discovery import build +from collections import defaultdict + +sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" + + + +def fetchTutors(): + + SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] + + SERVICE_ACCOUNT_FILE = "sheets_api_credentials.json" + + credientials = Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES) + + service = build('sheets', 'v4', credentials = credientials) + + sheets = service.spreadsheets() + + ranges = "B:E" + sheet_read = sheets.values().get(spreadsheetId=sheet_id, range=ranges).execute() + + responses = sheet_read.get('values', []) + + tutors = list() + + for entry in responses: + # Skip empty lists sand header rows! + if not entry: # Skip empty lists + continue + if entry == responses[0]: # Skip the header row (optional) + continue + + if entry[2] == "Yes": + tutors.append(entry) + + + # Serialize to JSON + with open('tutors_list.json', 'w') as f: + json.dump(tutors, f, ensure_ascii=False) + + print(tutors) + +fetchTutors() diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index f8e6c03..47638f8 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; // Read the file -const jsonString = fs.readFileSync('path/to/file.json', 'utf-8'); +const jsonString = fs.readFileSync('path/to/tutors_list.json', 'utf-8'); console.log(jsonString) type Tutor = { diff --git a/src/content/StudentServices/tutors_list.json b/src/content/StudentServices/tutors_list.json new file mode 100644 index 0000000..7d72b7d --- /dev/null +++ b/src/content/StudentServices/tutors_list.json @@ -0,0 +1 @@ +[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinx3@illinois.edu", "Martin Xu", "Yes", "ECE 220"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 120, ECE 220"]] \ No newline at end of file From 253fccf648502cab0025fae420dff246142acf3c Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 16 Feb 2025 17:44:04 -0600 Subject: [PATCH 03/34] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a547bf3..ea076aa 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +src/content/StudentServices/sheets_api_credentials.json From 746befbc832670dc321b2d2666d746cbf3440d6c Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:15:26 -0600 Subject: [PATCH 04/34] fixed file path --- src/content/StudentServices/tutors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index 47638f8..ce500bb 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; // Read the file -const jsonString = fs.readFileSync('path/to/tutors_list.json', 'utf-8'); +const jsonString = fs.readFileSync('tutors_list.json', 'utf-8'); console.log(jsonString) type Tutor = { From 18d623217f3b8a9760a5966f5888eefcbef9865e Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:26:12 -0600 Subject: [PATCH 05/34] updated node modules? --- package-lock.json | 35 +++++++++++++++++------------------ package.json | 1 + 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72267ca..91e00f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "hkn-homepage", "version": "0.0.0", "dependencies": { + "@types/node": "^22.13.5", "blurhash-to-css": "^0.5.5", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" @@ -761,12 +762,12 @@ } }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", - "dev": true, + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/pug": { @@ -3355,10 +3356,10 @@ "dev": true }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", @@ -4257,12 +4258,11 @@ } }, "@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", - "dev": true, + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "@types/pug": { @@ -6142,10 +6142,9 @@ "dev": true }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "unist-util-stringify-position": { "version": "2.0.3", diff --git a/package.json b/package.json index 92010ef..c89ef77 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "vitest-dom": "^0.1.1" }, "dependencies": { + "@types/node": "^22.13.5", "blurhash-to-css": "^0.5.5", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" From 7f277e3e129da7ce9b1a41976d2f2549104d8563 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:31:11 -0600 Subject: [PATCH 06/34] Revert "updated node modules?" This reverts commit 18d623217f3b8a9760a5966f5888eefcbef9865e. --- package-lock.json | 35 ++++++++++++++++++----------------- package.json | 1 - 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91e00f7..72267ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "hkn-homepage", "version": "0.0.0", "dependencies": { - "@types/node": "^22.13.5", "blurhash-to-css": "^0.5.5", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" @@ -762,12 +761,12 @@ } }, "node_modules/@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", - "license": "MIT", + "version": "20.8.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", + "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "dev": true, "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~5.26.4" } }, "node_modules/@types/pug": { @@ -3356,10 +3355,10 @@ "dev": true }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "license": "MIT" + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", @@ -4258,11 +4257,12 @@ } }, "@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "version": "20.8.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", + "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "dev": true, "requires": { - "undici-types": "~6.20.0" + "undici-types": "~5.26.4" } }, "@types/pug": { @@ -6142,9 +6142,10 @@ "dev": true }, "undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "unist-util-stringify-position": { "version": "2.0.3", diff --git a/package.json b/package.json index c89ef77..92010ef 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "vitest-dom": "^0.1.1" }, "dependencies": { - "@types/node": "^22.13.5", "blurhash-to-css": "^0.5.5", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" From be63cefd7d6afd558d48b1a60a8261d88073acbc Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:31:25 -0600 Subject: [PATCH 07/34] moving tutors_list.json to public --- .../StudentServices => public}/tutors_list.json | 0 src/content/StudentServices/tutors.ts | 14 +++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) rename {src/content/StudentServices => public}/tutors_list.json (100%) diff --git a/src/content/StudentServices/tutors_list.json b/public/tutors_list.json similarity index 100% rename from src/content/StudentServices/tutors_list.json rename to public/tutors_list.json diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index ce500bb..975d447 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -1,9 +1,3 @@ -import * as fs from 'fs'; - -// Read the file -const jsonString = fs.readFileSync('tutors_list.json', 'utf-8'); -console.log(jsonString) - type Tutor = { name: string; email: string; @@ -13,8 +7,14 @@ type Tutor = { courses: string; }; +export let tutors: Tutor[] = []; -export const tutors: Tutor[] = JSON.parse(jsonString) as Tutor[]; +fetch('/tutors_list.json') + .then((response) => response.json()) + .then((data) => { + tutors = data as Tutor[]; + }) + .catch((error) => console.error('Error loading tutors:', error)); // export const tutors: Tutor[] = [ // // { From 55e27b2c500836b1d0e29099445d33f62aabc2c9 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:35:20 -0600 Subject: [PATCH 08/34] debugging --- src/content/StudentServices/tutors.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index 975d447..d454365 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -12,6 +12,7 @@ export let tutors: Tutor[] = []; fetch('/tutors_list.json') .then((response) => response.json()) .then((data) => { + console.log(data) tutors = data as Tutor[]; }) .catch((error) => console.error('Error loading tutors:', error)); From 136a970b10e41da4a19792d438f51a3b160d540e Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 14:42:23 -0600 Subject: [PATCH 09/34] Converting to type Tutor --- src/content/StudentServices/tutors.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/content/StudentServices/tutors.ts b/src/content/StudentServices/tutors.ts index d454365..f2408e6 100644 --- a/src/content/StudentServices/tutors.ts +++ b/src/content/StudentServices/tutors.ts @@ -1,9 +1,9 @@ + /** + * Comma-separated string of courses + */ type Tutor = { name: string; email: string; - /** - * Comma-separated string of courses - */ courses: string; }; @@ -12,8 +12,13 @@ export let tutors: Tutor[] = []; fetch('/tutors_list.json') .then((response) => response.json()) .then((data) => { - console.log(data) - tutors = data as Tutor[]; + tutors = data.map((t: string[]) => ({ + email: t[0], + name: t[1], + courses: t[3], + })); + + console.log(tutors); // Check the parsed Tutor objects }) .catch((error) => console.error('Error loading tutors:', error)); From 87f0750465f7d8ec1de8c170b70a59574dddef70 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 15:10:04 -0600 Subject: [PATCH 10/34] github workflow - 30mins for now --- src/content/StudentServices/fetchTutors.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index 41c5405..d72ec9e 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -5,8 +5,6 @@ sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" - - def fetchTutors(): SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] From 0d261ae51a9e9ae018e9f8aaf5ff4431e67a5281 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 15:11:55 -0600 Subject: [PATCH 11/34] git workflow - 30mins --- .github/workflows/fetch-tutors.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/fetch-tutors.yml diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml new file mode 100644 index 0000000..f9645c3 --- /dev/null +++ b/.github/workflows/fetch-tutors.yml @@ -0,0 +1,32 @@ +name: Fetch Tutors Data + +on: + schedule: + - cron: '*/30 * * * *' # Runs every 30 minutes + workflow_dispatch: # Allows manual triggering + +jobs: + update-tutors: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install Dependencies + run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests + + - name: Run fetchTutors Script + run: python fetchTutors.py + + - name: Commit and Push Changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add tutors_list.json + git commit -m "Update tutors_list.json [Automated]" || echo "No changes to commit" + git push From 8a71ffd8f882f78e816978144f64f508c704d088 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 16:30:47 -0600 Subject: [PATCH 12/34] Fixed workflow --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index f9645c3..fd1a238 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -21,7 +21,7 @@ jobs: run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests - name: Run fetchTutors Script - run: python fetchTutors.py + run: python src/content/StudentServices/fetchTutors.py - name: Commit and Push Changes run: | From c3b31d9d541dc106386dc4863761bfa6be392bb9 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 23 Feb 2025 16:36:57 -0600 Subject: [PATCH 13/34] fixed workflow --- public/tutors_list.json | 2 +- src/content/StudentServices/fetchTutors.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/tutors_list.json b/public/tutors_list.json index 7d72b7d..60bbe7a 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinx3@illinois.edu", "Martin Xu", "Yes", "ECE 220"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 120, ECE 220"]] \ No newline at end of file +[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"]] \ No newline at end of file diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index d72ec9e..b7b3e84 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -1,9 +1,11 @@ +import os import json from google.oauth2.service_account import Credentials from googleapiclient.discovery import build from collections import defaultdict sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" +netlify_build_hook = "https://api.netlify.com/build_hooks/67bb8caad28293b98a790a50" def fetchTutors(): @@ -33,10 +35,11 @@ def fetchTutors(): if entry[2] == "Yes": tutors.append(entry) - + PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../")) + json_file_path = os.path.join(PROJECT_ROOT, "public", "tutors_list.json") # Serialize to JSON - with open('tutors_list.json', 'w') as f: + with open(json_file_path, 'w') as f: json.dump(tutors, f, ensure_ascii=False) print(tutors) From 944eb442daeb58c6e297624d89c9d13b17a4e8d9 Mon Sep 17 00:00:00 2001 From: starblastbhan1 Date: Tue, 25 Feb 2025 22:00:49 -0600 Subject: [PATCH 14/34] fixed 486 --- src/content/StudentServices/review_sessions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/StudentServices/review_sessions.ts b/src/content/StudentServices/review_sessions.ts index 9b8895b..1f95b7c 100644 --- a/src/content/StudentServices/review_sessions.ts +++ b/src/content/StudentServices/review_sessions.ts @@ -181,7 +181,7 @@ export const reviewSessions: Record<1 | 2 | 3, ReviewSession[]>= { course: "ECE 486", //time: "TBD", location: "ECEB 1015", - time: "2/2, 3:00-5:00PM", + time: "3/2, 3:00-5:00PM", // location: "ECEB 1002", // recordingLink: "https://mediaspace.illinois.edu/media/t/1_sxn7f3z6", // slidesLink: "https://docs.google.com/presentation/d/1umRdm6g6jMtTdmjKkQ4TOy9RG-BespwyCiBSjszgNoM/edit#slide=id.p" From a242537460b600af68249e254a97d50fa709cbc6 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 14:30:00 -0500 Subject: [PATCH 15/34] Update fetch-tutors.yml --- .github/workflows/fetch-tutors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index fd1a238..7fc6e19 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -4,6 +4,7 @@ on: schedule: - cron: '*/30 * * * *' # Runs every 30 minutes workflow_dispatch: # Allows manual triggering + push: jobs: update-tutors: From fe94b13256e7a3f268f4bb27b8fcd9bbaf524201 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 14:58:59 -0500 Subject: [PATCH 16/34] env variable and github actions --- .gitignore | 1 + package-lock.json | 18 ++++++++++++++++++ package.json | 1 + public/tutors_list.json | 2 +- src/content/StudentServices/fetchTutors.py | 12 ++++-------- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ea076aa..ef8facf 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ dist-ssr *.sln *.sw? src/content/StudentServices/sheets_api_credentials.json +.env diff --git a/package-lock.json b/package-lock.json index 72267ca..020de97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "blurhash-to-css": "^0.5.5", + "dotenv": "^16.4.7", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" }, @@ -1438,6 +1439,18 @@ "node": ">=12" } }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -4771,6 +4784,11 @@ "webidl-conversions": "^7.0.0" } }, + "dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==" + }, "entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", diff --git a/package.json b/package.json index 92010ef..b80b3ec 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ }, "dependencies": { "blurhash-to-css": "^0.5.5", + "dotenv": "^16.4.7", "svelte-routing": "^1.6.0", "svelte-select": "^5.6.1" } diff --git a/public/tutors_list.json b/public/tutors_list.json index 60bbe7a..5fd6dd0 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"]] \ No newline at end of file +[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index b7b3e84..d4684fe 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -3,19 +3,15 @@ from google.oauth2.service_account import Credentials from googleapiclient.discovery import build from collections import defaultdict +from dotenv import load_dotenv sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" -netlify_build_hook = "https://api.netlify.com/build_hooks/67bb8caad28293b98a790a50" def fetchTutors(): + load_dotenv() + API_KEY = os.getenv("SHEETS_API_KEY") - SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] - - SERVICE_ACCOUNT_FILE = "sheets_api_credentials.json" - - credientials = Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES) - - service = build('sheets', 'v4', credentials = credientials) + service = build('sheets', 'v4', developerKey=API_KEY) sheets = service.spreadsheets() From 8099372769ccb9c02ba5ce5f3b480f9e14e90711 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:13:25 -0500 Subject: [PATCH 17/34] Update workflow --- .github/workflows/fetch-tutors.yml | 6 ++++++ src/content/StudentServices/fetchTutors.py | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 7fc6e19..5dd0bcb 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -21,6 +21,12 @@ jobs: - name: Install Dependencies run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests + - name: Create .env file + run: | + echo "API_KEY=${{ secrets.API_KEY }}" > .env + env: + API_KEY: ${{ secrets.API_KEY }} + - name: Run fetchTutors Script run: python src/content/StudentServices/fetchTutors.py diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index d4684fe..9259e40 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -1,15 +1,13 @@ import os import json -from google.oauth2.service_account import Credentials from googleapiclient.discovery import build -from collections import defaultdict from dotenv import load_dotenv sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" +load_dotenv() +API_KEY = os.getenv("SHEETS_API_KEY") def fetchTutors(): - load_dotenv() - API_KEY = os.getenv("SHEETS_API_KEY") service = build('sheets', 'v4', developerKey=API_KEY) From 936fbd0bb50f98012df82f098df0634743203df4 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:15:08 -0500 Subject: [PATCH 18/34] Update workflow to add dotenv --- .github/workflows/fetch-tutors.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 5dd0bcb..4caefcc 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -19,7 +19,7 @@ jobs: python-version: '3.9' - name: Install Dependencies - run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests + run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests python-dotenv - name: Create .env file run: | @@ -36,4 +36,4 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git add tutors_list.json git commit -m "Update tutors_list.json [Automated]" || echo "No changes to commit" - git push + git push \ No newline at end of file From c5b0c2940e87afaa0528360e3c9513acd74fe701 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:22:36 -0500 Subject: [PATCH 19/34] Update workflow for credentials --- .github/workflows/fetch-tutors.yml | 16 ++++++++-------- src/content/StudentServices/fetchTutors.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 4caefcc..6e9ffec 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -3,7 +3,7 @@ name: Fetch Tutors Data on: schedule: - cron: '*/30 * * * *' # Runs every 30 minutes - workflow_dispatch: # Allows manual triggering + workflow_dispatch: push: jobs: @@ -19,13 +19,13 @@ jobs: python-version: '3.9' - name: Install Dependencies - run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client requests python-dotenv + run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client python-dotenv - - name: Create .env file - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - env: - API_KEY: ${{ secrets.API_KEY }} + - name: Create Google Credentials File + run: echo '${{ secrets.GOOGLESHEETSAPIKEY }}' > credentials.json + + - name: Set Environment Variable + run: echo "GOOGLE_APPLICATION_CREDENTIALS=$GITHUB_WORKSPACE/credentials.json" >> $GITHUB_ENV - name: Run fetchTutors Script run: python src/content/StudentServices/fetchTutors.py @@ -36,4 +36,4 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git add tutors_list.json git commit -m "Update tutors_list.json [Automated]" || echo "No changes to commit" - git push \ No newline at end of file + git push diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index 9259e40..502fad8 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -1,15 +1,20 @@ import os import json +from google.oauth2.service_account import Credentials from googleapiclient.discovery import build -from dotenv import load_dotenv sheet_id = "1WnuVYrK_CKNv2iooqLCqYOpvyX8U401lMseo0DQ-Kd8" -load_dotenv() -API_KEY = os.getenv("SHEETS_API_KEY") +netlify_build_hook = "https://api.netlify.com/build_hooks/67bb8caad28293b98a790a50" def fetchTutors(): - service = build('sheets', 'v4', developerKey=API_KEY) + SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] + + SERVICE_ACCOUNT_FILE = "sheets_api_credentials.json" + + credientials = Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES) + + service = build('sheets', 'v4', credentials = credientials) sheets = service.spreadsheets() From 704a269f4076bb5bb8fefd3e03616c62b31ad887 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:25:11 -0500 Subject: [PATCH 20/34] Update workflow for credentials --- .github/workflows/fetch-tutors.yml | 2 +- src/content/StudentServices/fetchTutors.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 6e9ffec..c3112c2 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -22,7 +22,7 @@ jobs: run: pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client python-dotenv - name: Create Google Credentials File - run: echo '${{ secrets.GOOGLESHEETSAPIKEY }}' > credentials.json + run: echo '${{ secrets.GOOGLESHEETAPIKEY }}' > credentials.json - name: Set Environment Variable run: echo "GOOGLE_APPLICATION_CREDENTIALS=$GITHUB_WORKSPACE/credentials.json" >> $GITHUB_ENV diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index 502fad8..dce40a4 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -10,7 +10,7 @@ def fetchTutors(): SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] - SERVICE_ACCOUNT_FILE = "sheets_api_credentials.json" + SERVICE_ACCOUNT_FILE = os.getenv("GOOGLESHEETAPIJEY") credientials = Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES) From 87809e139f4c1be0404344d9f7dc5940e2bf2d04 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:26:24 -0500 Subject: [PATCH 21/34] Update workflow for credentials --- src/content/StudentServices/fetchTutors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/StudentServices/fetchTutors.py b/src/content/StudentServices/fetchTutors.py index dce40a4..ea0cb78 100644 --- a/src/content/StudentServices/fetchTutors.py +++ b/src/content/StudentServices/fetchTutors.py @@ -10,7 +10,7 @@ def fetchTutors(): SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] - SERVICE_ACCOUNT_FILE = os.getenv("GOOGLESHEETAPIJEY") + SERVICE_ACCOUNT_FILE = os.getenv("GOOGLESHEETAPIKEY") credientials = Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES) From 03595ff8dd3799cdc5ddd05299cbad59d816cdb3 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:28:28 -0500 Subject: [PATCH 22/34] Update workflow for credentials --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index c3112c2..8a53ecb 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -25,7 +25,7 @@ jobs: run: echo '${{ secrets.GOOGLESHEETAPIKEY }}' > credentials.json - name: Set Environment Variable - run: echo "GOOGLE_APPLICATION_CREDENTIALS=$GITHUB_WORKSPACE/credentials.json" >> $GITHUB_ENV + run: echo "GOOGLESHEETAPIKEY=$GITHUB_WORKSPACE/credentials.json" >> $GITHUB_ENV - name: Run fetchTutors Script run: python src/content/StudentServices/fetchTutors.py From e1aa6d1e9cefdca6ac8e4d50009f1c9d85ff9871 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:30:20 -0500 Subject: [PATCH 23/34] Update workflow for credentials --- .github/workflows/fetch-tutors.yml | 2 +- public/tutors_list.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 8a53ecb..29a4396 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -34,6 +34,6 @@ jobs: run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add tutors_list.json + git add ../../../public/tutors_list.json git commit -m "Update tutors_list.json [Automated]" || echo "No changes to commit" git push diff --git a/public/tutors_list.json b/public/tutors_list.json index 5fd6dd0..60bbe7a 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file +[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"]] \ No newline at end of file From f195e2a30bdde97dd81e22bffbc1b0be999f36fd Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:31:21 -0500 Subject: [PATCH 24/34] Updating workflow --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 29a4396..bf0d15a 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -34,6 +34,6 @@ jobs: run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add ../../../public/tutors_list.json + git add public/tutors_list.json git commit -m "Update tutors_list.json [Automated]" || echo "No changes to commit" git push From 69463811279688983507502e4fbb8f52ded49444 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Mar 2025 20:31:41 +0000 Subject: [PATCH 25/34] Update tutors_list.json [Automated] --- public/tutors_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tutors_list.json b/public/tutors_list.json index 60bbe7a..5fd6dd0 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"]] \ No newline at end of file +[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file From ee18acd11c09029c0618121c6afa83600803ab56 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:36:11 -0500 Subject: [PATCH 26/34] Updating workflow --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index bf0d15a..77c3fb7 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -2,7 +2,7 @@ name: Fetch Tutors Data on: schedule: - - cron: '*/30 * * * *' # Runs every 30 minutes + - cron: '*/10 * * * *' # Runs every 10 minutes workflow_dispatch: push: From 48a9984e7bbff454aa5a7d1245adeb031e255c8f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Mar 2025 20:36:56 +0000 Subject: [PATCH 27/34] Update tutors_list.json [Automated] --- public/tutors_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tutors_list.json b/public/tutors_list.json index 5fd6dd0..cd34c90 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 110, ECE 120"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file +[["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 313"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file From f39931563bfaaa8367530c7670adf0675d1e709e Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 15:54:11 -0500 Subject: [PATCH 28/34] Updating workflow --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 77c3fb7..cf03673 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -2,7 +2,7 @@ name: Fetch Tutors Data on: schedule: - - cron: '*/10 * * * *' # Runs every 10 minutes + - cron: '* * * * *' # Runs every 10 minutes workflow_dispatch: push: From 0e4017c14316954e4202821ba3b1d5b1c16ff2d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Mar 2025 20:54:30 +0000 Subject: [PATCH 29/34] Update tutors_list.json [Automated] --- public/tutors_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tutors_list.json b/public/tutors_list.json index cd34c90..1e6315c 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 313"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"]] \ No newline at end of file +[["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 210"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"], ["martinxu1234@gmail.com", "A fake person", "Yes", "ECE 120, ECE 220"]] \ No newline at end of file From 32725975be1ca201fac3718f80f175acd85b524a Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 9 Mar 2025 16:00:26 -0500 Subject: [PATCH 30/34] Reverting to every 30mins --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index cf03673..bf0d15a 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -2,7 +2,7 @@ name: Fetch Tutors Data on: schedule: - - cron: '* * * * *' # Runs every 10 minutes + - cron: '*/30 * * * *' # Runs every 30 minutes workflow_dispatch: push: From c2e3bb0373eb15f9bf92ae7f2db0556d4f6b175e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Mar 2025 21:00:45 +0000 Subject: [PATCH 31/34] Update tutors_list.json [Automated] --- public/tutors_list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tutors_list.json b/public/tutors_list.json index 1e6315c..436a8e1 100644 --- a/public/tutors_list.json +++ b/public/tutors_list.json @@ -1 +1 @@ -[["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 210"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"], ["martinxu1234@gmail.com", "A fake person", "Yes", "ECE 120, ECE 220"]] \ No newline at end of file +[["martinxu1234@gmail.com", "Testing", "Yes", "ECE 110, ECE 220, ECE 313"], ["src15@illinois.edu", "Sohithesh Chevireddy", "Yes", "ECE 110, ECE 120, ECE 210, ECE 220, ECE 310, ECE 313"], ["sohumb3@illinois.edu", "Sohum Bhan", "Yes", "ECE 210"], ["cookiehp3@gmail.com", "Testing Dummy", "Yes", "ECE 110, ECE 310, ECE 313"], ["cookiehp2@gmail.com", "Mike Ross", "Yes", "ECE 120, ECE 210, ECE 220, ECE 313"], ["martinxu1234@gmail.com", "Nevermind", "Yes", "ECE 120, ECE 220, PHYS 214"]] \ No newline at end of file From 2d7efa55788924e210e3ff7b656ddcfead5b9b6e Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 30 Mar 2025 14:24:51 -0500 Subject: [PATCH 32/34] test --- src/content/StudentServices/review_sessions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/StudentServices/review_sessions.ts b/src/content/StudentServices/review_sessions.ts index 1f95b7c..a6a210d 100644 --- a/src/content/StudentServices/review_sessions.ts +++ b/src/content/StudentServices/review_sessions.ts @@ -342,7 +342,7 @@ export const reviewSessions: Record<1 | 2 | 3, ReviewSession[]>= { // // location: "ECEB 1013", // // recordingLink: "https://mediaspace.illinois.edu/media/t/1_zr2finr9", // // scribblesLink: "https://academic.acm.illinois.edu/assets/cs438/fa24/mt1/pdf/ACM_438_MT1_Review_scribbles.pdf", - // // slidesLink: "https://drive.google.com/file/d/1RqSnWJsyhM_CvzVChLeQ3l6vumhbuaii/view?usp=drive_link", + // slidesLink: "https://drive.google.com/file/d/1RqSnWJsyhM_CvzVChLeQ3l6vumhbuaii/view?usp=drive_link", // }, { From f13444677b3cb1cf98c34215c71ebdf33eb68006 Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 30 Mar 2025 14:34:05 -0500 Subject: [PATCH 33/34] update fetch tutor workflow --- .github/workflows/fetch-tutors.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index bf0d15a..70f9500 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v3 + with: + ref: martin - name: Set up Python uses: actions/setup-python@v4 From 599ad87a6868a0d85e85ee74faea40010646ae5c Mon Sep 17 00:00:00 2001 From: maartoon Date: Sun, 30 Mar 2025 14:41:39 -0500 Subject: [PATCH 34/34] Update every 5 mins --- .github/workflows/fetch-tutors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fetch-tutors.yml b/.github/workflows/fetch-tutors.yml index 70f9500..ceab691 100644 --- a/.github/workflows/fetch-tutors.yml +++ b/.github/workflows/fetch-tutors.yml @@ -2,7 +2,7 @@ name: Fetch Tutors Data on: schedule: - - cron: '*/30 * * * *' # Runs every 30 minutes + - cron: '*/5 * * * *' # Runs every 5 minutes workflow_dispatch: push: