NTHU_SELECT is a tool that help NTHU students to analyze courses information and choose the most appropriate course .By entering python commands ,we can filter/sort courses in different ways , avoid selecting courses by intuition !
Being a sophomore in NTHU , jumping through webpages for consideration of selecting courses makes me feel very unconfortable.And this is why I come up with the idea of designing my own tool of selecting courses.At first, I expect marking a period after finishing the sorting functions , but I found joy while the project goes further , so further updates could occur at every second if I have time ...
Wish this tool helps you , ENJOY LEARNING !
Before you begin, ensure you have met the following requirements:
-
Having basic python understanding (For advanced usage)
-
You have a machine that is able to execute python3 :
if not , then download from : https://www.python.org/downloads/
-
You have read the instructions for using NTHU_SELECT
-
The result html file has a little display defect on Safari browser ,for better experience please use Chrome !!
-
Clone or download the zip file
-
Install required python3 modules in requirements.txt using pip3 installer
-
change directory to the installed folder and execute main.py:
In this section,we use the sample html in "resources" folder for example demonstration step by step
LCES :
- Download a department's LCES (Latest course enrollment status) html webpage using chrome , and save as "LCES":
- Open the downloaded folder "LCES_files" and find the file named "xp03_m.html" , rename it :
- Put one or more LCES html (obtaiined on step 2) in a directory (like the sample directory "LCES" in "resources" folder ) ,and enter the relative directory path to the program
CASD:
-
Go to CASD (Course average and Standard deviation webpage and just press "submit" :
-
Same as LCES ,download the CASD html using chrome save as "CASD":
-
Open the downloaded folder "CASD_files" and find the file named "xp03_m.html" , rename it:
-
Enter the relative path of CASD file to the program
URL:
Sample terminal input by above instructions :
There are six information variable contained for each course :
-
num
-> course number -
name
-> course name -
teacher
-> course teacher -
time
-> course time , in the form like 'R5R6' , 'T1T2T3' , etc. -
possibility
-> possibility rate to enroll this course , ( 1 means 100% ) -
gpa
-> Average GPA of the course in past semester -
deviation
-> GPA deviation of the course in past semester -
score
-> average original score of the course in past semester -
score_deviation
-> average deviation of original score of the course in past semester
ps. value '-1' means information not provided
After following the instructions above , there should be a file created under NTHU_SELECT's directory called "result.html", and information of courses are list on a default table called "BASE".(About the viewing of results , see View result part below for more information. )
BASIC FUNCTIONS:
list
:list <conditional expressions in python>
-> list out courses that fits the conditional expression on current table
Example :
list gpa>3
Result :
filter
:filter <conditional expressions in python>
-> list out courses that fits the conditional expression by considering the courses on the table currently.
Example :
filter 'M5M6' in time
Result :
-
sort
:sort a <sort key/sort function>
-> sort the courses in the table with the given sort function , in ascending ordersort d <sort key/sort function>
-> sort the courses in the table with the given sort function , in descending order
ps. For the usage of sort function ,see 'MAKING YOUR OWN FUNCTIONS' part below
Example:
sort d gpa
Result :
remove
:remove <index1> <index2> ...
-> remove a course from table by index (indexes are shown in the leftmost column of the table)
Example :
remove 3
Result :
reset
:reset
-> reset the table (listing all courses)
Example :
reset
Result :
convert
:convert
-> since there are classes provide original score informations , instead providing gpa informations ,so users can use this feature to "roughly" convert "gpa to score" or "score to gpa" , converted information will be marked red . Also, users can set their own customized converting function in "settings" section in extensions.py (see MAKING YOUR OWN FUNCTIONS: part below).
Example:
convert
Result:
exit
:exit
-> exit the program
MORE FUNCTIONS:
unshow
:unshow <info1> <info2 ...
-> let the table unshow these informations
Example :
unshow num deviation
Result :
show
:show <info1> <info2> ...
-> let the table include these informations
Example :
show deviation num
Result :
show_mode
:show_mode <html/text>
-> let table result been shown in html format or text format
Example :
show_mode text
Result :
Example :
show_mode html
Result :
renew_url
:renew_url <url>
-> if link of the course doesn't leads to syllabus,sign in to curriculum again and get the new syllabus url
TABLE FUNCTIONS:
add_table
:add_table <new table name> <inherit table name (optional) >
-> create a new table and switch to it , the new table can be a copy of other table by adding the additional parameter
Example :
add_table table2
Result :
table added !
change
:change <table name>
-> switch to other table
Example :
change BASE
Result :
table changed !
delete_table
:delete_table <table name>
-> delete table
Example :
delete_table table2
Result :
table deleted !
MAKING YOUR OWN FUNCTIONS:
-
function
:function <function(parameter)>
-> users can define their own python analyzing function in extensions.py for individual usage ,make sure:-
Briefly trace code of objects.py to get more understanding of the program
-
The first parameter of every function needs to be "self" ,
-
For sorting function : return values ex. return gpa ,return ,etc.
-
For list/filter function : return list of 'course' object (please see class 'course' in objects.py)
-
Sample function in extensions.py : (given a string of available time , filter the possible courses that is able to attend in that time )
Example application :
function courses_in_available_time('R1R2R3R4T1T2T3T4')
Result :
-
Converting functions
:Since gpa and score informations cannot be directly converted ,so users can set their own converting functions in setting to convert these two datas in their own way.Please remember function "SCORE_TO_GPA" and "GPA_TO_SCORE" can only be modified , but not removed !!
Default converting function in extensions.py :
-
If the show mode is html ,then there will be a file called "result.html" produced in the same directory of NTHU_SELECT , you can look up the result by using Chrome browser or VS code extensions (Safari browser may cause encoding errors).
-
If the show mode is text,then there will be a file called "result.txt" produced in the same directory of NTHU_SELECT
To contribute to this project:
- Fork this repository.
- Create branch
- Make changes and commit them
- Push to your github
- Create pull request.
- Send a message to me via email
If you want to contact me you can reach me at dereklin100503@gmail.com
This project uses the following license: MIT License.