Commit graph

288 commits

Author SHA1 Message Date
Kornelius Rohrschneider da3bcefbb9
Added UI options to enable the existing export search
The setting on whether the existing export search is enabled or not has been made configurable in both the CLI and the GUI (instead of being hardcoded):
- A search-existing-exports option has been added to all CLI export commands, which enables the existing export search for the respective command.
- A Search for existing exports option has been added to the GUI settings, which enables the existing export search for exports.

Additionally, there have been several minor improvements:
- The ConsoleProgressLogger has been fixed to interpolate given messages (previously, the square brackets in the default export file names could cause an exception).
- The names of existing channel exports in log messages have been enclosed by quotation marks.
- The setting on how to handle existing export files has been renamed from prev-export / Previous Export to export-exists / Export Exists.
2025-10-30 01:40:59 +01:00
Kornelius Rohrschneider 90ed829375
Added existing export search
Previously, an existing export could only be detected if it existed at the current file target path.
However, if the name of the channel, the channel parent or the guild has changed or if the default file name formatting has changed, the existing export's file name would be different, and it could therefore not be detected.
Therefore, the option to explicitly search for the existing export in the target directory has been added.
If it's activated (and there's no existing export at the current file target path), all file names in the target directory will be compared to a regex that matches any file name the channel export (with the same date range) might have had in the past.
If several existing exports have been detected, an error is logged and the channel export is aborted. Otherwise, it continues as before (only additionally moving the existing export files to the to the new file paths if they should be appended).
Whether this new option is activated is currently hardcoded.
The enum FileExistsHandling has been renamed to ExportExistsHandling to clarify that the setting applies to existing exports in general.

If file names of a directory are needed, they are collected lazily and stored for future use in other channel exports to avoid unnecessary I/O operations.
2025-10-30 00:04:37 +01:00
Kornelius Rohrschneider 4461a53f8b
Added an export progress logger
An export progress logger has been added to the exporter. It provides a consistent way to log the entire process of an export, meaning all status updates of each of the exported channels. It also allows to count the different results of the individual channel exports and can provide a summary of them.
There are two subclasses: The ConsoleProgressLogger logs the status updates with colors on the console while the SnackbarProgressLogger logs them in the GUI snackbar.

Previously, two exceptions had been used to signalize "warnings" and "errors", and respective messages had been displayed (GUI) respectively collected and displayed after the export finished (CLI) upon catching them.
Individual counts had been used to display an export summary message after the export finished.

The new logging system has numerous advantages:
- It allows logging status updates during a channel export (without having to abort it). Therefore, it also allows for informational messages, success messages and (non-urgent) warning messages to be logged.
- It doesn't use exceptions in situations without any need for exceptional handling, resulting in cleaner code.
- It logs all these messages instantly on both the CLI and GUI, instead of only displaying the log messages after the export finished.
- It removes duplicated code structures between the CLI and GUI parts; replacing individual logging / counting code with a general consistent logger / counter, which improves the code quality.
- This also makes it handle the logging much more consistently: Not only are the messages logged in the general export codebase, but their appearance and formatting are now defined together in a single place, making the logging system much more consistent and maintainable.

Using the new system, many informational messages and warning messages have been added to the export process. This particularly includes messages about the handling of existing export files that had been added provisionally with Console.WriteLine.
The existing messages have also been made more consistent with each other.
Furthermore, the logging of success messages has been added to the exporter. This allows the user to better watch the progress in the GUI and solves the problem that the progress hadn't been watchable in the CLI if parallel exports had been enabled.

The export summary message has also been massively improved:
While previously, it had just contained the number of channels that have been successfully exported, the handling of existing export files has added other possible export results, specifically the channel having already been exported and being appended or overwritten successfully, and the channel having already been exported and not having been appended as there are no new messages.
Therefore, the export summary has been changed to contain the number of channel exports that resulted in each occurring export result.
This also means that it now contains the number of empty new channel exports (which had previously not been included).
2025-10-28 02:34:21 +01:00
Kornelius Rohrschneider ad33600e70
Added UI options to set the file exists handling
The setting the exporter uses to handle existing export files has been made configurable in both the CLI and the GUI (instead of being hardcoded):
- A prev-export option has been added to all CLI export commands, which sets the file exists handling for the respective command.
- A Previous Export option has been added to the GUI settings, which sets the file exists handling that's used for exports.
2025-10-26 01:28:24 +02:00
dependabot[bot] a383722469
Bump the nuget group with 13 updates (#1431)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-02 16:08:07 +03:00
dependabot[bot] a966bee140
Bump the nuget group with 12 updates (#1429)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 19:50:14 +03:00
dependabot[bot] 9e685a0375
Bump the nuget group with 15 updates (#1408)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 19:00:52 +03:00
Tyrrrz cc92b2cbe6 More cleanup 2025-06-08 22:53:10 +03:00
Tyrrrz 08718425f1 Clean up 2025-06-08 22:37:24 +03:00
Tyrrrz 22134108a4 Apply new formatting 2025-06-08 21:17:10 +03:00
dependabot[bot] 82499af25a
Bump CliFx and 9 others (#1389)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-08 21:13:22 +03:00
audinowho d4fa8f0954
Support --include-threads in the export command (#1343) 2025-05-27 23:37:54 +03:00
Oleksii Holub 612ae2e894
Add a setting to control whether to respect advisory rate limits (#1342) 2025-05-12 19:52:47 +03:00
Yudi 30ba273fb1
Update bot token docs (#1371)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com>
2025-05-04 19:49:42 +03:00
Tyrrrz f9fa35b6ad Downgrade CSharpier 2025-05-03 23:40:59 +03:00
dependabot[bot] 7d2ebb04de
Bump the nuget group across 1 directory with 11 updates (#1374)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 23:40:26 +03:00
Tyrrrz 6fb197cf0b Refactor 2025-04-02 00:34:52 +03:00
Leonardo Mosquera 7add81a472
Don't consider it an error if there is nothing to export (#1349) 2025-04-02 00:14:35 +03:00
dependabot[bot] 7663f8ed31
Bump the nuget group with 14 updates (#1340)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 21:50:25 +02:00
dependabot[bot] 45ff1daff3
Bump the nuget group with 12 updates (#1329)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 13:13:45 +02:00
dependabot[bot] bf417db80c
Bump the nuget group with 15 updates (#1318)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 18:51:14 +02:00
Tyrrrz 09e0b3f133 Format stuff 2024-10-26 21:41:16 +03:00
dependabot[bot] f5cdd5c8be
Bump the nuget group with 8 updates (#1302)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 21:10:21 +03:00
dependabot[bot] 8519ec0fff
Bump the nuget group with 9 updates (#1283)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 19:05:04 +03:00
Oleksii Holub c8ea365c04
Strip symbols (#1242) 2024-05-28 00:57:11 +03:00
Oleksii Holub 949abc2582
Fix --partition and --filter options not working due to assembly trimming (#1240) 2024-05-26 23:12:05 +03:00
Tyrrrz f1bc5a2266 Remove NoWarn in the CLI project 2024-05-23 17:23:49 +03:00
Oleksii Holub 91b7486f45
Publish trimmed builds (#1235) 2024-05-21 22:02:46 +03:00
Oleksii Holub b7548756a8
Use self-contained builds (#1224) 2024-05-16 20:42:15 +03:00
Tyrrrz 5623c2ca34 Update NuGet packages 2024-04-28 02:26:34 +03:00
Oleksii Holub 8525917a4c
Make the GUI x-platform and adapt the CI/CD pipeline to accommodate that (#1222) 2024-04-28 02:24:23 +03:00
Oleksii Holub b9c1c47474
Migrate to Avalonia (#1220) 2024-04-27 04:17:46 +03:00
Tyrrrz 12b590d9f9 Use [] in place of Array.Empty<T>() 2024-03-28 03:22:51 +02:00
Tyrrrz 0e87098889 Make the DCE.CLI unix entrypoint script work regardless of current working directory 2024-03-05 19:39:06 +02:00
Oleksii Holub 0139eeaeed
Add DiscordChatExporter.Cli.sh for simpler usage from shell (#1205) 2024-03-02 04:59:49 +02:00
Oleksii Holub 057beaacd6
Use null as the default locale, which resolves to the current system default locale (#1185) 2024-01-15 23:58:28 +02:00
Tyrrrz 8e36002ae7 Slightly better naming 2023-12-29 00:17:11 +02:00
Oleksii Holub a2c5d2e2dd
Warn about redirected streams in the CLI only when running inside Docker (#1176) 2023-12-29 00:14:43 +02:00
Tyrrrz 4e3deb409c Update NuGet packages 2023-12-29 00:08:16 +02:00
Oleksii Holub 512f181be2
Refer to "guilds" as "servers" in docs and UI elements (#1175) 2023-12-29 00:03:28 +02:00
Tyrrrz e04eb890e6 Improve wording 2023-12-28 23:56:19 +02:00
Tyrrrz b3a1cbf635 Update NuGet packages 2023-12-10 22:38:34 +02:00
Tyrrrz 619fe9ccf7 Refactor using c# 12 features 2023-12-10 22:38:34 +02:00
Tyrrrz 481ddc4cd5 Update usage guide in apps 2023-11-19 22:52:03 +02:00
Tyrrrz 1c343b75f8 Update NuGet packages 2023-11-18 23:49:25 +02:00
Tyrrrz 008c2e64aa Clean up 2023-11-17 18:37:52 +02:00
Tyrrrz e89701e3f9 Provide more context in exception messages 2023-11-16 21:10:24 +02:00
Tyrrrz 5d7a74eece Switch to .NET 8 2023-11-14 20:05:27 +02:00
Tyrrrz 7c014bf64d Add a note about interactivity in the CLI 2023-11-11 16:39:36 +02:00
Tyrrrz 4896d748aa Update NuGet packages 2023-11-09 13:06:00 +02:00