diff --git a/ScheduleGrabber/Grabber.cs b/ScheduleGrabber/Grabber.cs index f0b75d6..a35ae83 100644 --- a/ScheduleGrabber/Grabber.cs +++ b/ScheduleGrabber/Grabber.cs @@ -55,7 +55,7 @@ static void Main(string[] args) var options = new OptionSet() .Add("h|help", "show this message and exit", v => show_help = v != null) .Add("f|file=", "write JSON to specified file", input => file = input) - .Add("i|id=", "write only the specified ID to JSON file", input => id = input); + .Add("i|id=", "write only the schedule data related to a specific department ID to JSON file", input => id = input); try { @@ -111,8 +111,9 @@ static void Main(string[] args) static void ShowHelp(OptionSet options) { Console.WriteLine("Usage: ScheduleGrabber [OPTIONS]"); - Console.WriteLine("Write UiA schedule data to JSON"); - Console.WriteLine("If no flags are given, departments.json is generated."); + Console.WriteLine("Write UiA schedule data to JSON."); + Console.WriteLine("If no flags are given, departments.json is generated\n" + + "from the schedule data of all departments."); Console.WriteLine(); Console.WriteLine("Options:"); options.WriteOptionDescriptions(Console.Out); diff --git a/ScheduleGrabber/Objects/Day.cs b/ScheduleGrabber/Objects/Day.cs index ff891bb..2a93d63 100644 --- a/ScheduleGrabber/Objects/Day.cs +++ b/ScheduleGrabber/Objects/Day.cs @@ -6,6 +6,7 @@ namespace ScheduleGrabber.Objects public class Day { public DateTime Date { get; set; } + public string DayOfWeek { get; set; } public List Activities { get; set; } public Day() diff --git a/ScheduleGrabber/Objects/Department.cs b/ScheduleGrabber/Objects/Department.cs index 47e4123..887f9b3 100644 --- a/ScheduleGrabber/Objects/Department.cs +++ b/ScheduleGrabber/Objects/Department.cs @@ -78,6 +78,7 @@ public void GrabSchedule(PostData requestData) Day aday = new Day(); aday.Activities.Add(activity); aday.Date = new DateTime(activity.Start.Year, activity.Start.Month, activity.Start.Day); + aday.DayOfWeek = aday.Date.DayOfWeek.ToString(); dayList.Add(aday); } else if (currentDate.Count() == 1)