Metadata-Version: 2.1
Name: bcitflex
Version: 3.1.1
Summary: Browse BCIT Flex course offerings.
License: MIT
Author: Jonathan Biemond
Author-email: jbiemond@my.bcit.ca
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: alembic (>=1.11.1,<2.0.0)
Requires-Dist: flask (>=2.3.3,<3.0.0)
Requires-Dist: flask-sqlalchemy (>=3.0.5,<4.0.0)
Requires-Dist: psycopg2 (>=2.9.6,<3.0.0)
Requires-Dist: pysimplegui (>=4.60.4,<5.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: selectolax (>=0.3.12,<0.4.0)
Requires-Dist: sqlalchemy (>=2.0.19,<3.0.0)
Requires-Dist: tabulate (>=0.8.10,<0.9.0)
Description-Content-Type: text/markdown

[![ci](https://github.com/jonbiemond/BCIT-Flex/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jonbiemond/BCIT-Flex/actions/workflows/ci.yml)
# BCIT Flex
Webscrape BCIT available courses, quickly view course offerings and write the information to a text file

Please feel free to report any issues, bugs or suggestions. Pull requests are welcome.

The information is

- Code
- Name
- Prerequisites
- Credits
- URL
- Offerings
  - Instructor
  - Price
  - Duration
  - Meeting Times
  - Status
  - Rate My Professor URLs

## Installation

- Clone the repository
- Install the requirements `poetry install`

Note: Additionally a PostgreSQL instance is required for the database.

### DB Setup

PostgreSQL is used as the DBMS.
To create and initialize the database:

1. Create a database using the cli command. Pass `--help` for more information.
```bash
flask --app bcitflex create-db
```
2. Build schema using alembic:
```bash
poetry run alembic upgrade head
```
3. Populate the database with subjects from psql:
```bash
\i bcitflex/scripts/populate_subject.sql
```

## Usage

To run the webscraper and populate the database with the latest course offerings:
```bash
poetry run flask --app bcitflex load-db
```

To run the webserver:
```bash
poetry run flask --app bcitflex run
```

## Supports

- Displaying all course offerings for specific course
- Saving all courses to a text file for a specific subject

## TODO

- Filter by prerequisites
- ~~Individual Course Offerings~~
- ~~Rate My Professors~~
- ~~Web app~~
- ~~GUI~~
- Return RMP rating

## Contributors

- Sam - [0x53616D75656C](https://github.com/0x53616D75656C)
- Jonathan - [jonbiemond](https://github.com/jonbiemond)

