Filter which messages are exported (#622)

This commit is contained in:
Lucas LaBuff
2021-07-07 15:14:40 -04:00
committed by GitHub
parent 95cd6cb50c
commit d39fc212b6
21 changed files with 327 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ using DiscordChatExporter.Core.Discord;
using DiscordChatExporter.Core.Discord.Data;
using DiscordChatExporter.Core.Exceptions;
using DiscordChatExporter.Core.Exporting;
using DiscordChatExporter.Core.Exporting.Filtering;
using DiscordChatExporter.Core.Exporting.Partitioning;
using DiscordChatExporter.Core.Utils.Extensions;
using Tyrrrz.Extensions;
@@ -35,6 +36,9 @@ namespace DiscordChatExporter.Cli.Commands.Base
[CommandOption("partition", 'p', Description = "Split output into partitions, each limited to this number of messages (e.g. 100) or file size (e.g. 10mb).")]
public PartitionLimit PartitionLimit { get; init; } = NullPartitionLimit.Instance;
[CommandOption("filter", Description = "Only include messages that satisfy this filter (e.g. from:foo#1234).")]
public MessageFilter MessageFilter { get; init; } = NullMessageFilter.Instance;
[CommandOption("parallel", Description = "Limits how many channels can be exported in parallel.")]
public int ParallelLimit { get; init; } = 1;
@@ -76,6 +80,7 @@ namespace DiscordChatExporter.Cli.Commands.Base
After,
Before,
PartitionLimit,
MessageFilter,
ShouldDownloadMedia,
ShouldReuseMedia,
DateFormat