diff --git a/Config.cs b/Config.cs
index 6240c9f..a8b74a6 100644
--- a/Config.cs
+++ b/Config.cs
@@ -1,8 +1,23 @@
namespace PublishTimes;
+///
+/// Represents the configuration settings for exporting a schedule,
+/// including file name, directory path, and available topics.
+///
public class Config
{
+ ///
+ /// Gets or sets the name of the schedule file.
+ ///
public string? File { get; set; }
+
+ ///
+ /// Gets or sets the directory path where the schedule file is stored.
+ ///
public string? Path { get; set; }
+
+ ///
+ /// Gets or sets the list of available topics from the configuration file.
+ ///
public TomlArray? Topics { get; set; }
}
diff --git a/Program.cs b/Program.cs
index 29aec70..1001e23 100644
--- a/Program.cs
+++ b/Program.cs
@@ -34,6 +34,11 @@ for (int i = 0; i < numberOfArticles; i++)
startTime = nextTime; // Update start time for the next article
}
+///
+/// Converts a TimeSpan into a 12-hour AM/PM formatted time string.
+///
+/// The TimeSpan representing the time of day.
+/// A formatted string representing the time in AM/PM format.
string TimeSpanToAMPM(TimeSpan time)
{
var minutes = time.TotalMinutes;
@@ -46,7 +51,11 @@ string TimeSpanToAMPM(TimeSpan time)
return $"{hours12}:{time.Minutes:D2} {period}";
}
-
+///
+/// Exports the scheduled articles to a file, allowing the user to modify
+/// the directory, filename, and list of topics based on
+/// a configuration file if available.
+///
void ExportSchedule()
{
var cfgPath = Path.Combine(appDir, cfgFile);
@@ -105,6 +114,10 @@ void ExportSchedule()
}
+///
+/// Displays the scheduled article times in a formatted manner and provides
+/// options to export the schedule or restart the scheduling process.
+///
void PrintSchedule()
{
if (isRestart)
@@ -138,4 +151,5 @@ void PrintSchedule()
}
}
+// Start the loop
PrintSchedule();