diff --git a/DiscordChatExporter/Models/Theme.cs b/DiscordChatExporter/Models/Theme.cs index c527812..54db5c5 100644 --- a/DiscordChatExporter/Models/Theme.cs +++ b/DiscordChatExporter/Models/Theme.cs @@ -2,7 +2,7 @@ { public enum Theme { - Light, - Dark + Dark, + Light } } \ No newline at end of file diff --git a/DiscordChatExporter/Program.cs b/DiscordChatExporter/Program.cs index bf37b2e..d040672 100644 --- a/DiscordChatExporter/Program.cs +++ b/DiscordChatExporter/Program.cs @@ -10,8 +10,8 @@ namespace DiscordChatExporter { public static class Program { - private static readonly DiscordApiService DiscordApiService = new DiscordApiService(); - private static readonly HtmlExportService HtmlExportService = new HtmlExportService(); + private static readonly DiscordApiService ApiService = new DiscordApiService(); + private static readonly HtmlExportService ExportService = new HtmlExportService(); private static Options GetOptions(string[] args) { @@ -51,12 +51,12 @@ namespace DiscordChatExporter // Get messages Console.WriteLine("Getting messages..."); - var messages = await DiscordApiService.GetMessagesAsync(options.Token, options.ChannelId); + var messages = await ApiService.GetMessagesAsync(options.Token, options.ChannelId); var chatLog = new ChatLog(options.ChannelId, messages); // Export Console.WriteLine("Exporting messages..."); - HtmlExportService.Export($"{options.ChannelId}.html", chatLog, options.Theme); + ExportService.Export($"{options.ChannelId}.html", chatLog, options.Theme); } public static void Main(string[] args) diff --git a/DiscordChatExporter/Resources/HtmlExportService/Template.html b/DiscordChatExporter/Resources/HtmlExportService/Template.html index 54704ba..738d777 100644 --- a/DiscordChatExporter/Resources/HtmlExportService/Template.html +++ b/DiscordChatExporter/Resources/HtmlExportService/Template.html @@ -4,10 +4,11 @@ Discord Chat Log + - + + diff --git a/DiscordChatExporter/Services/HtmlExportService.cs b/DiscordChatExporter/Services/HtmlExportService.cs index 0eb5132..aaba431 100644 --- a/DiscordChatExporter/Services/HtmlExportService.cs +++ b/DiscordChatExporter/Services/HtmlExportService.cs @@ -14,10 +14,10 @@ namespace DiscordChatExporter.Services { private HtmlDocument GetTemplate() { - string templateName = "DiscordChatExporter.Resources.HtmlExportService.Template.html"; + string resourcePath = "DiscordChatExporter.Resources.HtmlExportService.Template.html"; var assembly = Assembly.GetExecutingAssembly(); - var stream = assembly.GetManifestResourceStream(templateName); + var stream = assembly.GetManifestResourceStream(resourcePath); if (stream == null) throw new MissingManifestResourceException("Could not find template resource"); @@ -31,12 +31,12 @@ namespace DiscordChatExporter.Services private string GetStyle(Theme theme) { - string styleName = $"DiscordChatExporter.Resources.HtmlExportService.{theme}Theme.css"; + string resourcePath = $"DiscordChatExporter.Resources.HtmlExportService.{theme}Theme.css"; var assembly = Assembly.GetExecutingAssembly(); - var stream = assembly.GetManifestResourceStream(styleName); + var stream = assembly.GetManifestResourceStream(resourcePath); if (stream == null) - throw new MissingManifestResourceException("Could not find theme style resource"); + throw new MissingManifestResourceException("Could not find style resource"); using (stream) using (var reader = new StreamReader(stream))