diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index bef2aded..ead579e4 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -2,7 +2,7 @@ name: Automatic Event Date Updater on: schedule: - - cron: "0 */4 * * *" + - cron: "0 0 * * *" workflow_dispatch: inputs: branch: diff --git a/app/api/eventsRefresher/route.ts b/app/api/eventsRefresher/route.ts new file mode 100644 index 00000000..7703470e --- /dev/null +++ b/app/api/eventsRefresher/route.ts @@ -0,0 +1,19 @@ +import { NextRequest, NextResponse } from "next/server"; +import {exec} from 'child_process'; +import path from "path"; +//api endpoint that executes google sheets python script when called (by vercel's cron job function) +let scriptPath = '/Users/gabewkung/UCSBTASA.github.io/scripts/script_2.py' +export async function GET(request: NextRequest) { + exec(`python3 ${scriptPath}`, (error, stdout, stderr) => { + if (error) { + console.error(`Error: ${error.message}`); + return NextResponse.json({status: `unsuccessful ${error.message}`}); + } + if (stderr) { + console.error(`Error: ${stderr}`); + return NextResponse.json({status: `Error: ${stderr}`}) + } + return NextResponse.json({status: "success", output: stdout}) + }) + return NextResponse.json({ message: 'cron job ran' }); +} diff --git a/app/page.tsx b/app/page.tsx index 302a7a5f..3d1c0fcc 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -5,8 +5,8 @@ import Carousel from "../components/carousel"; const Home = () => { return (
Time:
{event.customTime === "" ? (
- {event.time} PST
+ {formatTime(event.time)} PST
) : (
event.customTime
)}
diff --git a/data/eventData.ts b/data/eventData.ts
index 23290086..340fed8e 100644
--- a/data/eventData.ts
+++ b/data/eventData.ts
@@ -1,227 +1,164 @@
const events =
[
{
- "title": "Speed Dating",
- "day of week": "Friday",
- "date": "2024-01-19",
- "time": "8-9:30PM",
- "location": "Lot 22/ Phelps 1160",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "GM #1",
+ "title": "99 Rising Tabling",
"day of week": "Monday",
- "date": "2024-01-22",
- "time": "8-10PM",
- "location": "TD-W 1701",
+ "date": "2025-9-29",
+ "time": "9:00-14:00",
+ "location": "HSSB Courtyard",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Field Day",
- "day of week": "Friday",
- "date": "2024-01-26",
- "time": "3-5PM",
- "location": "Student Health Lawn",
+ "title": "Fall Kickoff General Meeting",
+ "day of week": "Thursday",
+ "date": "2025-10-09",
+ "time": "20:00-22:00",
+ "location": "Broida 1610",
"customTime": "",
"ready": "Yes"
},
{
- "title": "TFTI",
+ "title": "Big Little Pickup: Virtual Speed Dating",
"day of week": "Saturday",
- "date": "2024-01-27",
- "time": "Overnight",
- "location": "UCLA (Mesa Lawn)",
- "customTime": "Overnight",
- "ready": "Yes"
- },
- {
- "title": "Winter Big/Little Reveal",
- "day of week": "Sunday",
- "date": "2024-02-04",
- "time": "2-4PM",
- "location": "Top of Lot 22",
+ "date": "2025-10-11",
+ "time": "20:00-22:00",
+ "location": "Zoom",
"customTime": "",
"ready": "Yes"
},
{
- "title": "GM #2",
+ "title": "Big Little Pickup: In Person Speed Dating",
"day of week": "Monday",
- "date": "2024-02-05",
- "time": "8-10PM",
- "location": "TD-W 1701",
+ "date": "2025-10-13",
+ "time": "18:45-21:00",
+ "location": "Lot 22 Top Flor",
"customTime": "",
"ready": "Yes"
},
{
- "title": "TASA Online Game Night\n",
- "day of week": "Wednesday",
- "date": "2024-02-07",
- "time": "8:00 PM",
- "location": "Online (Discord)",
+ "title": "Big Little Pickup: Beach Day",
+ "day of week": "Tuesday",
+ "date": "2025-10-21",
+ "time": "14:00-16:00",
+ "location": "Goleta Beach",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Mahjong Mocktails",
- "day of week": "Thursday",
- "date": "2024-02-08",
- "time": "8-10PM ",
- "location": "Girvetz 1115",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "NSU x TASA",
+ "title": "Big Little Pickup: Arts and Crafts Night",
"day of week": "Friday",
- "date": "2024-02-09",
- "time": "5-7; 9-12AM",
- "location": "Girvetz 1004",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "Lunar New Year Hotpot Night!",
- "day of week": "Saturday",
- "date": "2024-02-10",
- "time": "6-9PM",
- "location": "Multi Cultural Center",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "TASA Talks",
- "day of week": "Thursday",
- "date": "2024-02-15",
- "time": "8-10PM",
- "location": "Girvetz 1116",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "GM #1 w/ Hochaya",
- "day of week": "Monday",
- "date": "2024-04-08",
- "time": "8-10PM",
- "location": "TD-W 1701",
- "customTime": "",
- "ready": "Yes"
- },
- {
- "title": "TASA Talks",
- "day of week": "Thursday",
- "date": "2024-04-11",
- "time": "8-10PM",
- "location": "Girvetz 1115",
+ "date": "2025-10-24",
+ "time": "21:00-23:00",
+ "location": "SRB Multipurpose Room",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Mahjong Night",
- "day of week": "Friday",
- "date": "2024-04-12",
- "time": "6-8PM",
- "location": "Arts 1349",
+ "title": "TASA x Vons Fundraiser",
+ "day of week": "Tuesday",
+ "date": "2025-11-04",
+ "time": "15:00-20:00",
+ "location": "Von's Chicken",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Edible Campus Collab",
- "day of week": "Saturday",
- "date": "2024-04-13",
- "time": "2-3PM",
- "location": "St. Michael\u2019s University Church (6586 Picasso Rd)",
+ "title": "TASA Big Little Pickup Reveal",
+ "day of week": "Tuesday",
+ "date": "2025-11-04",
+ "time": "16:00-18:00",
+ "location": "Top of Lot 22",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Maid Cafe",
- "day of week": "Thursday",
- "date": "2024-04-18",
- "time": "6:30- 8:30PM",
- "location": "ARTS 1356",
+ "title": "Tanghulu and Trivia Night",
+ "day of week": "Wednesday",
+ "date": "2025-11-05",
+ "time": "19:00-21:00",
+ "location": "SRB Multipurpose Room",
"customTime": "",
"ready": "Yes"
},
{
- "title": "VSA x TASA Collab",
- "day of week": "Friday",
- "date": "2024-04-19",
- "time": "5-7PM",
- "location": "ARTS 1349",
+ "title": "TASA Movie Night",
+ "day of week": "Sunday",
+ "date": "2025-11-09",
+ "time": "19:00-21:00",
+ "location": "TBD",
"customTime": "",
"ready": "Yes"
},
{
- "title": "TASA Talks",
+ "title": "TASA GM 3",
"day of week": "Thursday",
- "date": "2024-04-25",
- "time": "8-10 PM",
- "location": "girvetz 1115",
+ "date": "2025-11-13",
+ "time": "20:00-22:30",
+ "location": "Broida 1610",
"customTime": "",
"ready": "Yes"
},
{
- "title": "Night Market",
- "day of week": "Saturday",
- "date": "2024-05-04",
- "time": "4-8PM",
- "location": "Storke Plaza",
+ "title": "Fam Dumpling Kit Distribution",
+ "day of week": "Tuesday",
+ "date": "2025-11-18",
+ "time": "18:00-19:30",
+ "location": "Check TASA Messenger for details and location!",
"customTime": "",
"ready": "Yes"
},
{
- "title": "TASA Talks",
- "day of week": "Thursday",
- "date": "2024-05-09",
- "time": "8-10 PM",
- "location": "Girvetz 1115",
- "customTime": "",
+ "title": "TASA Winter Retreat",
+ "day of week": "Monday",
+ "date": "2025-1-13",
+ "time": "Overnight",
+ "location": "Frazier Park",
+ "customTime": "Overnight",
"ready": "Yes"
},
{
- "title": "GM #3: Elections",
- "day of week": "Monday",
- "date": "2024-05-20",
- "time": "8-10 PM",
+ "title": "Winter GM 1 W/ Hochaya",
+ "day of week": "Wednesday",
+ "date": "2025-1-22",
+ "time": "20:00-22:00",
"location": "TD-W 1701",
"customTime": "",
"ready": "Yes"
},
{
- "title": "TASA Talks",
- "day of week": "Thursday",
- "date": "2024-05-23",
- "time": "8-10 PM",
- "location": "Girvetz 1115",
- "customTime": "",
+ "title": "Pickup Coloring Night!",
+ "day of week": "Friday",
+ "date": "2025-1-24",
+ "time": "TBD",
+ "location": "Arts 1353, 1356, 1349",
+ "customTime": "TBD",
"ready": "Yes"
},
{
- "title": "Banquet",
- "day of week": "Thursday",
- "date": "2024-05-30",
- "time": "7-9 PM",
- "location": "Mosher Alumni House",
- "customTime": "",
+ "title": "Field Day!",
+ "day of week": "Sunday",
+ "date": "2025-1-26",
+ "time": "TBD",
+ "location": "Student Health Lawn",
+ "customTime": "TBD",
"ready": "Yes"
},
{
- "title": "Senior Appreciation",
- "day of week": "Friday",
- "date": "2024-05-31",
- "time": "4-6 PM",
- "location": "ARTS 1353",
- "customTime": "",
+ "title": "TASA x UCLA TFTI",
+ "day of week": "Monday",
+ "date": "2025-1-27",
+ "time": "Overnight",
+ "location": "UCLA",
+ "customTime": "Overnight",
"ready": "Yes"
},
{
- "title": "TASA Talks",
- "day of week": "Thursday",
- "date": "2024-06-06",
- "time": "8-10 PM",
- "location": "Girvetz 1115",
+ "title": "Winter GM #2",
+ "day of week": "Wednesday",
+ "date": "2025-2-5",
+ "time": "20:00-22:00",
+ "location": "TD-W 1701",
"customTime": "",
"ready": "Yes"
}
diff --git a/next-env.d.ts b/next-env.d.ts
index 4f11a03d..fd36f949 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,6 @@
///