diff --git a/Program.cs b/Program.cs index 7c58bda..c5dd133 100644 --- a/Program.cs +++ b/Program.cs @@ -116,8 +116,8 @@ string SelectTopics(List topics) userChoices.Add($"{numOfTopics} {title}"); } - var topicSelect = string.Join(", ", userChoices.ToArray()); - Console.WriteLine($"{Environment.NewLine}Choose a Topic{Environment.NewLine}{topicSelect}"); + var selection = string.Join(", ", userChoices.ToArray()); + Console.WriteLine($"{Environment.NewLine}Select a Number{Environment.NewLine}{selection}"); var input = Console.ReadLine(); // Attempt to parse a number. @@ -129,45 +129,6 @@ string SelectTopics(List topics) return topicChoice; } -/// -/// Prompts the user to select a date (either today or tomorrow) and returns the selected date as a formatted string. -/// -/// A string representing the selected date in a short date format. -string SelectDate() -{ - var dtChoices = new[] { "Today", "Tomorrow" }; - var dtDict = new Dictionary(); - var dtSelection = new List(); - var dtChoice = 0; - var dtNum = 0; - - foreach (var days in dtChoices) - { - dtNum++; - var day = days.Trim(); - dtDict.Add(dtNum, day); - dtSelection.Add($"{dtNum} {day}"); - } - - var topicSelect = string.Join(", ", dtSelection.ToArray()); - Console.WriteLine($"{Environment.NewLine}Choose a Date{Environment.NewLine}{topicSelect}"); - var input = Console.ReadLine(); - - // Attempt to parse a number. - if (int.TryParse(input, out dtNum) == true) - dtChoice = dtNum; - - // Any choice above 2 tomorrow - if (dtChoice >= 2) - { - var dt = DateTime.Now.AddDays(1); - return dt.ToString("d"); - } - - return DateTime.Today.ToString("d"); -} - /// /// Allows the user to choose a new topic from a given list or default to placeholder if no selection is made. /// @@ -251,8 +212,6 @@ void ExportSchedule(List storeTimes) topics = config.Topics.ToList(); chosenTopic = NewTopic(topics); - var date = SelectDate(); - // Write to file. var jsonContent = File.ReadAllText(filePath); var jsonList = string.IsNullOrWhiteSpace(jsonContent) ? new List() @@ -262,7 +221,6 @@ void ExportSchedule(List storeTimes) jsonList.Add(new Schedule() { Topic = chosenTopic.Trim(), - Date = date, Times = times, }); diff --git a/PublishTimes.csproj b/PublishTimes.csproj index b412cef..ef9295c 100644 --- a/PublishTimes.csproj +++ b/PublishTimes.csproj @@ -4,7 +4,7 @@ Exe net9.0 enable - 0.2.105 + 0.2.101 enable diff --git a/README.md b/README.md index f3cb362..191612d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ An optional ``config.toml`` file allows for further customization of file name, [ { "topic": "Games", - "date": "3/16/2025", "times": [ "11:41 AM", "2:05 PM", diff --git a/Schedule.cs b/Schedule.cs index c430bc9..7b7ed6f 100644 --- a/Schedule.cs +++ b/Schedule.cs @@ -4,9 +4,6 @@ public class Schedule [JsonPropertyName("topic")] public string Topic { get; set; } = ""; - [JsonPropertyName("date")] - public string Date { get; set; } = ""; - [JsonPropertyName("times")] public IList Times { get; set; } = new List(); }