From 2ea2cdbaf9dc072615c1c7619d9bce2f7d8a3948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Mon, 6 Nov 2023 21:54:09 +0100 Subject: [PATCH] docs --- .gitignore | 160 +--------------------------------------- LICENSE | 2 +- README.md | 30 +------- prod.docker-compose.yml | 2 +- 4 files changed, 6 insertions(+), 188 deletions(-) diff --git a/.gitignore b/.gitignore index 5882c35..40b878d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,159 +1 @@ - -Skip to content -Pulls -Issues -Marketplace -Explore -@Flakt -github / -gitignore - -3.1k -106k - - 56k - -Code -Pull requests 163 -Actions -Projects -Security - - Insights - -gitignore/Node.gitignore -@ch4ot1c -ch4ot1c Add .yarn/install-state.gz to Node.gitignore (#3407) -Latest commit 7293c14 on May 14 -History -58 contributors -@stuartpb -@shiftkey -@SimonSiefke -@TennyZhuang -@venatoria -@ro31337 -@Richienb -@melonmanchan -@gouthamve -@jucrouzet -@cheddar -@arcresu -116 lines (86 sloc) 1.77 KB -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* -__pycache__/ \ No newline at end of file +node_modules/ \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9fe5dd1..1dcb54a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 G.U.D. Chalmers +Copyright (c) 2023 G.U.D. Chalmers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9e2ceff..53d83d1 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,9 @@ # Lasvecka -A web-application for displaying the current study week at Chalmers University of Technology. +A web-application for displaying the current study week at Chalmers University of Technology. ## How it works -The application is divided into a frontend running React.js, and a backend hosting a python-flask server. The backend scrapes the -[student-portal](https://student.portal.chalmers.se/sv/chalmersstudier/Sidor/Lasarstider.aspx) at Chalmers to get dates, which are then used in the frontend to determine the current study week. +The application is a scraper and a frontend. The scraper scrapes +[student-portal](https://www.student.chalmers.se/sp/academic_year_list) at Chalmers to get dates, which are then used in the frontend to determine the current study week. ## Running the app locally -First, change the code in `WeekDisplay.js` and `app.py` to use localhost: -```javascript - // Use localhost:5000/getData for dev - componentDidMount() { - axios - .get("https://api.lasvecka.nu/getData") - .then(res => { - this.setState({ - data: res.data - }); - }) - .catch(err => { - console.log(err); - }); - } -``` -```python - if __name__ == '__main__': - # Dev purposes only - # app.run(host="0.0.0.0") - - # For prod - serve(app, listen='0.0.0.0:5000') -``` Use command `docker-compose -f dev.docker-compose.yaml up` to run the dev docker-compose.yml. diff --git a/prod.docker-compose.yml b/prod.docker-compose.yml index e157d1a..05a2fc8 100644 --- a/prod.docker-compose.yml +++ b/prod.docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: app: container_name: lasvecka-node - iamge: ghcr.io/gudchs/lasvecka:main + image: ghcr.io/gudchalmers/lasvecka:main restart: unless-stopped ports: - 3000:3000