Skip to content
Permalink
Browse files

update for 2019 sem 2

  • Loading branch information...
ruarai committed May 19, 2019
1 parent 9844013 commit 7255db4094608ffee4e4cc7cd0c47c6c371872b2
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.11.4.0" newVersion="1.11.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -15,7 +15,7 @@ class Program
//What year/semester you are fetching for
//This should still include year long subjects
private const int Year = 2019;
private const int Semester = 1;
private const int Semester = 2;

//Number of pages to fetch
//Needs to be determined manually for each new semester, just look at
@@ -33,21 +33,18 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.dll</HintPath>
<Private>True</Private>
<Reference Include="HtmlAgilityPack, Version=1.11.4.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.11.4\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack.CssSelectors, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.CssSelectors.1.0.2\lib\net45\HtmlAgilityPack.CssSelectors.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.1.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.1.0\lib\net452\RestSharp.dll</HintPath>
<Private>True</Private>
<Reference Include="RestSharp, Version=106.6.9.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.6.9\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="HtmlAgilityPack" version="1.6.5" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.11.4" targetFramework="net452" />
<package id="HtmlAgilityPack.CssSelectors" version="1.0.2" targetFramework="net452" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
<package id="RestSharp" version="106.1.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net452" />
<package id="RestSharp" version="106.6.9" targetFramework="net452" />
</packages>
@@ -209,7 +209,7 @@ private async Task<List<Subject>> subjectsFromSubjectCodes(List<string> subjectC
return subjects;
}

private const string SubjectCodeFile = "codes_2019_sem_1.json";
private const string SubjectCodeFile = "codes_2019_sem_2.json";

//Fetches the subjects from disk and creates a list from them
private List<Subject> getSubjects()
@@ -208,7 +208,7 @@ private bool classEquivalent(ScheduledClass a, ScheduledClass b)

//To find below SemesterWeeks value
//Look up a subject on the SWS website ("Displaying Dates: 04 Mar 2019 - 21 Apr 2019, 29 Apr 2019 - 02 Jun 2019 (week 10‑16,18‑22)")
private const string SemesterWeeks = "10-22";
private const string SemesterWeeks = "31-43";
private const string TimetableYear = "2019";

private async Task<string> getTimetableHTML(string subjectCode)
@@ -138,7 +138,7 @@
<div class="filler"></div>
<div class="footer">
<div>
Semester 1 2019
Semester 2 2019
</div>
<div>
Not affiliated with the University of Melbourne.

Large diffs are not rendered by default.

0 comments on commit 7255db4

Please sign in to comment.
You can’t perform that action at this time.