Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version-2.1.3 update script #46

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 42 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,97 +29,73 @@ Developed using HTML, CSS, and JavaScript, the front-end is built with an emphas
The server-side logic is implemented in Java, handling data processing, timetable generation algorithms(include Backtracking Algorithm and Genetic Algorithm), and integration with the front-end.

## Getting Started
### Prerequisites

```
Java Development Kit (JDK) 17 or higher
```
```
python packages include sqlite3 pymysql
```
```
Make sure you have MySQL installed and configured. You can use the provided web scraping scripts located in UofT-Timetable-Builder\script\sql_script to fetch the required data.
```
Here's a polished version of your prerequisites section:

## Installation
### Prerequisites
Ensure you have the following installed:

OS X & Linux:
+ **Java Development Kit (JDK)**: Version 17 or higher. You can download it from the official [Java website](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html).

+ **Python**: Version 3.10.X. Ensure you have the required dependency packages installed. This can be accomplished using pip:
```
pip install pymysql requests
```

1. Open a terminal.
2. Clone the repository using Git:
+ **MySQL**: Version 8.X.X.
+ **Note**: The default MySQL username and password for this project are `root` and `123456`, respectively. If your credentials differ, please adjust them accordingly in the project configuration.

## Installation/Deployment
OS X & Linux:
```sh
git clone https://github.com/UofT-Box/UofT-Timetable-Builder.git
```
3. Navigate to the project directory:
```sh
cd UofT-Timetable-Builder
python3 script/scrap_main.py
python3 script/mysql_data_transfer.py
python3 script/mysql_distance_transfer.py
mvn spring-boot:run
In browser tap http://localhost:8080/
```
4. Ensure that Java(17) is properly installed by running:
```sh
java -version
```
5. Enter target file
```sh
cd target
```
6. run using the 'java -jar' command
```sh
java -jar uofttimetablebuilder-2.1.0-RELEASE.jar
```
7. Go to browser tap:
```sh
http://localhost:8080/
```

Windows:
1. Open Command Prompt or PowerShell.
2. Clone the repository:
```sh
git clone https://github.com/yourusername/UofT-Timetable-Builder.git
```
3. Navigate to the project directory:
```sh
cd UofT-Timetable-Builder
```
4. Verify Java installation:
```
java -version
```
5. Enter target file
```sh
cd target
```
6. run using the 'java -jar' command
```sh
java -jar uofttimetablebuilder-2.1.0-RELEASE.jar
```
7. Go to browser tap:
```sh
http://localhost:8080/
python script/scrap_main.py
python script/mysql_data_transfer.py
python script/mysql_distance_transfer.py
./mvnw spring-boot:run
In browser tap http://localhost:8080/
```

### Usage example
Enter the first three letters of the course code in the search bar to display related available courses.
![](https://github.com/UofT-Box/image/blob/671ee8dff6486f3130e1987e6cf46cad3ad5666f/timetablebuilder1.png?raw=true)
![](https://github.com/UofT-Box/image/tree/master/timetable_builder/timetablebuilder1.png?raw=true)
You can arrange your own preference by selecting different options and dragging the slider.
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder2.png?raw=true)
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder2.png?raw=true)
Click on "GENERATE SCHEDULE" to generate a schedule.
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder3.png?raw=true)
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder3.png?raw=true)
You can switch between semesters by clicking on "Fall" or "Winter".
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder4.png?raw=true)
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder4.png?raw=true)
You can click on the section of the class schedule to get the section detail information.
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder5.png?raw=true)
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder5.png?raw=true)
Click on "MORE OPTIONS" to enter the thumbnail view.
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder6.png?raw=true)
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder6.png?raw=true)
Select the class schedule you want in the thumbnails
![](https://github.com/UofT-Box/image/blob/master/timetablebuilder7.png?raw=true)

## Deployment

To be continue
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder7.png?raw=true)
user lock feature
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder8.png?raw=true)
custom course scheduling feature
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder9.png?raw=true)
display of travel distance & time feature
![](https://github.com/UofT-Box/image/blob/master/timetable_builder/timetablebuilder10.png?raw=true)

## Release History
* 2.0.0
* Added custom course scheduling feature
* Added user lock feature
* Added timetable export functionality
* Added timetable favorites feature
* Added display of travel distance & time feature
* 1.1.0
* mobile adaptation
* 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.uoftbox</groupId>
<artifactId>uofttimetablebuilder</artifactId>
<version>2.1.2-RELEASE</version>
<version>2.1.3-RELEASE</version>
<name>uofttimetablebuilder</name>
<description>UofT Timetable Builder</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pymysql
import json
import os

conn = pymysql.connect(
host = 'localhost',
Expand Down Expand Up @@ -41,7 +42,8 @@
FOREIGN KEY(course_id) REFERENCES courses(course_id)
)
''')
for i in range(1,393):
number_of_files = len(os.listdir("./result"))
for i in range(1, number_of_files + 1):
file_path = f'result/{i}.json'
with open(file_path, 'r', encoding='utf-8') as file:
data = json.load(file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

conn_sqlite = sqlite3.connect("walking_distances.db")
conn_mysql = pymysql.connect(
host="localhost",
database="uoft_course_info",
user="root",
passwd="123456",
port=3306,
host = 'localhost',
database = 'uoft_course_info',
user = 'root',
passwd = '123456',
port = 3306
)

cursor_mysql = conn_mysql.cursor()
Expand Down
102 changes: 0 additions & 102 deletions script/original_generator_algorithm/backtranking_algorithm.py

This file was deleted.

Loading