From a50c8798bfe79a1ece4df4ef38fd15d3ecab71bb Mon Sep 17 00:00:00 2001 From: NikolaiStrong Date: Wed, 18 Mar 2026 01:32:14 -0400 Subject: [PATCH 1/4] adding main page for docs --- docs/index.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/index.md b/docs/index.md index e69de29..cc9c7bf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -0,0 +1,36 @@ +# TODO +- Add a link the mkDocs we do + +# Jumpstart V2: Electric Boogaloo + +![image](./docs/images/jumpstart_transparant.png) + +![Static Badge](https://img.shields.io/badge/%40gravy-made_by?style=flat-square&logo=github&labelColor=%230d1117&color=%23E11C52&link=https%3A%2F%2Fgithub.com%2FNikolaiStrong) + + +A graphical interface that displays important information at the entrance of CSH. +This is a backend re-write of the previous jumpstart. + +See it live [here](https://jumpstart.csh.rit.edu)! + +## Setup +1. Make sure you have docker installed +>> (OPTIONAL): You can use docker compose as well!! +2. Copy the .env.template file, rename it to .env and place it in the root folder +3. Ask an RTP for jumpstart secrets, add them to the .env accordingly + +## Run +1. Build the docker file +``` + docker build -t Jumpstart . +``` +2. Run the newly built docker on port 8000 +``` + docker run -p 8080:80 Jumpstart +``` + +## Alternatively, you can run the docker compose file as well +``` + docker compose up +``` + From f17e7f74ba50b0293421a9ea66be9c67b97ad7cb Mon Sep 17 00:00:00 2001 From: WeatherWorks <100982408+WeatherGod3218@users.noreply.github.com> Date: Wed, 18 Mar 2026 01:35:11 -0400 Subject: [PATCH 2/4] Update index.md --- docs/index.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index cc9c7bf..85fd061 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,3 @@ -# TODO -- Add a link the mkDocs we do - # Jumpstart V2: Electric Boogaloo ![image](./docs/images/jumpstart_transparant.png) From 3b0358c495624798ff4e62dc3e5d16e3117f00c9 Mon Sep 17 00:00:00 2001 From: Weather Date: Wed, 18 Mar 2026 02:59:35 -0400 Subject: [PATCH 3/4] Fixed? --- src/api/endpoints.py | 8 ++++---- src/core/wikithoughts.py | 12 ++++++------ src/main.py | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/api/endpoints.py b/src/api/endpoints.py index 35c2151..b7142cc 100644 --- a/src/api/endpoints.py +++ b/src/api/endpoints.py @@ -14,7 +14,7 @@ router: APIRouter = APIRouter() -@router.get("/calendar") +@router.get("/api/calendar") async def get_calendar() -> JSONResponse: """ Returns calendar data. @@ -31,7 +31,7 @@ async def get_calendar() -> JSONResponse: return JSONResponse(formatted_events) -@router.get("/announcement") +@router.get("/api/announcement") def get_announcement() -> JSONResponse: """ Returns announcement data. @@ -57,7 +57,7 @@ async def slack_events(request: Request) -> JSONResponse: try: logger.info("Received Slack event!") - + body: dict = await request.json() if request.headers.get("content-type") == "application/json": @@ -128,7 +128,7 @@ async def message_actions(payload: str = Form(...)) -> JSONResponse: return JSONResponse({"status": "success"}, status_code=200) -@router.get("/wikithought") +@router.get("/api/wikithought") async def wikithought() -> JSONResponse: """ Returns a random CSH wiki thought from the MediaWiki API. diff --git a/src/core/wikithoughts.py b/src/core/wikithoughts.py index dc35c5f..56f3f58 100644 --- a/src/core/wikithoughts.py +++ b/src/core/wikithoughts.py @@ -247,7 +247,7 @@ async def refresh_page_dictionary() -> None: def reset_queues() -> None: """ - Swaps Queued and Shown pages que + Swaps Queued and Shown pages queued """ global queued_pages, shown_pages logger.warning("RESETING QUEUES FOR WIKITHOUGHTS") @@ -277,20 +277,20 @@ async def get_next_display() -> dict[str, str]: await refresh_category_pages() - que_empty: bool = len(queued_pages) == 0 - if que_empty and len(shown_pages) == 0: + queue_empty: bool = len(queued_pages) == 0 + if queue_empty and len(shown_pages) == 0: logger.warning("ERROR?!?") current_page = { "page": "ERROR GETTING PAGE", "content": "ERROR FETCHING CONTENT", } - elif que_empty: + elif queue_empty: reset_queues() - que_empty = False + queue_empty = False new_page: str = queued_pages.pop() - if que_empty: + if queue_empty: reset_queues() shown_pages.append(new_page) diff --git a/src/main.py b/src/main.py index 4cd921f..ec0156f 100644 --- a/src/main.py +++ b/src/main.py @@ -64,7 +64,8 @@ async def docs_redirect(): logger.warning("Documentation directory not found, skipping documentation setup!") logger.info("Importing API endpoints!") -app.include_router(endpoints.router, prefix="/api") +#app.include_router(endpoints.router, prefix="/api") +app.include_router(endpoints.router) logger.info("Finished setting up the application!") From 8e7d61613cb85e482b8c3c6b0992567bdd45535d Mon Sep 17 00:00:00 2001 From: Weather Date: Wed, 18 Mar 2026 02:57:30 -0400 Subject: [PATCH 4/4] Shits fucked --- src/api/endpoints.py | 2 -- src/main.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/endpoints.py b/src/api/endpoints.py index b7142cc..603ae35 100644 --- a/src/api/endpoints.py +++ b/src/api/endpoints.py @@ -60,8 +60,6 @@ async def slack_events(request: Request) -> JSONResponse: body: dict = await request.json() if request.headers.get("content-type") == "application/json": - - if body.get("type") == "url_verification": return JSONResponse({"challenge": body.get("challenge")}) diff --git a/src/main.py b/src/main.py index ec0156f..861d12f 100644 --- a/src/main.py +++ b/src/main.py @@ -64,7 +64,7 @@ async def docs_redirect(): logger.warning("Documentation directory not found, skipping documentation setup!") logger.info("Importing API endpoints!") -#app.include_router(endpoints.router, prefix="/api") +# app.include_router(endpoints.router, prefix="/api") app.include_router(endpoints.router) logger.info("Finished setting up the application!")