mirror of
https://github.com/quatalog/quatalog.git
synced 2024-09-28 20:48:57 +00:00
Change to an ordered set so that the courses_list doesn't change order every rescrape
This commit is contained in:
parent
9ec4198155
commit
b81968e43a
|
@ -1,3 +1,4 @@
|
|||
#include<set>
|
||||
#include<regex>
|
||||
#include<utility>
|
||||
#include<fstream>
|
||||
|
@ -54,7 +55,7 @@ const std::unordered_map<std::string,std::string> attr_to_short_attr {
|
|||
{ "Culminating Exp/Capstone", "CulmExp" },
|
||||
{ "PDII Option for Engr Majors", "PDII" }
|
||||
};
|
||||
std::unordered_set<std::string> get_all_courses(const quatalog_data_t&);
|
||||
std::set<std::string> get_all_courses(const quatalog_data_t&);
|
||||
std::string fix_course_ids(std::string);
|
||||
bool create_dir_if_not_exist(const fs::path&);
|
||||
Json::Value get_data(const Json::Value&,std::string);
|
||||
|
@ -148,8 +149,8 @@ int main(const int argc,
|
|||
courses_list_file.close();
|
||||
}
|
||||
|
||||
std::unordered_set<std::string> get_all_courses(const quatalog_data_t& qlog) {
|
||||
std::unordered_set<std::string> output;
|
||||
std::set<std::string> get_all_courses(const quatalog_data_t& qlog) {
|
||||
std::set<std::string> output;
|
||||
for(const std::string& course : qlog.catalog.getMemberNames()) {
|
||||
if(course.length() != 9) continue;
|
||||
output.insert(fix_course_ids(course));
|
||||
|
|
11750
src/catalog.json
Normal file
11750
src/catalog.json
Normal file
File diff suppressed because it is too large
Load diff
32680
src/prerequisites.json
Normal file
32680
src/prerequisites.json
Normal file
File diff suppressed because it is too large
Load diff
90
src/terms_list.json
Normal file
90
src/terms_list.json
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"all_terms" :
|
||||
[
|
||||
"200709",
|
||||
"200801",
|
||||
"200805",
|
||||
"20080502",
|
||||
"20080503",
|
||||
"200809",
|
||||
"200901",
|
||||
"200905",
|
||||
"20090502",
|
||||
"20090503",
|
||||
"200909",
|
||||
"201001",
|
||||
"201005",
|
||||
"20100502",
|
||||
"20100503",
|
||||
"201009",
|
||||
"201101",
|
||||
"201105",
|
||||
"20110502",
|
||||
"20110503",
|
||||
"201109",
|
||||
"201201",
|
||||
"201205",
|
||||
"20120502",
|
||||
"20120503",
|
||||
"201209",
|
||||
"201301",
|
||||
"201305",
|
||||
"20130502",
|
||||
"20130503",
|
||||
"201309",
|
||||
"201401",
|
||||
"201405",
|
||||
"20140502",
|
||||
"20140503",
|
||||
"201409",
|
||||
"201501",
|
||||
"201505",
|
||||
"20150502",
|
||||
"20150503",
|
||||
"201509",
|
||||
"201601",
|
||||
"201605",
|
||||
"20160502",
|
||||
"20160503",
|
||||
"201609",
|
||||
"201701",
|
||||
"201705",
|
||||
"20170502",
|
||||
"20170503",
|
||||
"201709",
|
||||
"201801",
|
||||
"201805",
|
||||
"20180502",
|
||||
"20180503",
|
||||
"201809",
|
||||
"201901",
|
||||
"201905",
|
||||
"20190502",
|
||||
"20190503",
|
||||
"201909",
|
||||
"202001",
|
||||
"202005",
|
||||
"20200502",
|
||||
"20200503",
|
||||
"202009",
|
||||
"202101",
|
||||
"202105",
|
||||
"20210502",
|
||||
"20210503",
|
||||
"202109",
|
||||
"202112",
|
||||
"202201",
|
||||
"202205",
|
||||
"20220502",
|
||||
"20220503",
|
||||
"202209",
|
||||
"202212",
|
||||
"202301",
|
||||
"202305",
|
||||
"20230502",
|
||||
"20230503",
|
||||
"202309"
|
||||
],
|
||||
"current_term" : "202309",
|
||||
"oldest_term" : "200709"
|
||||
}
|
708010
src/terms_offered.json
Normal file
708010
src/terms_offered.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue