diff --git a/GUI,-CLI-and-Formats-explained.md b/GUI,-CLI-and-Formats-explained.md index 1370d82..957a282 100644 --- a/GUI,-CLI-and-Formats-explained.md +++ b/GUI,-CLI-and-Formats-explained.md @@ -225,6 +225,30 @@ If any of the folders in the path has a space in its name, add quotes ("). DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\myserver" ``` +### Generating the filename and output directory dynamically ↴ +You can use template tokens to generate the output file path based on the guild and channel metadata. + +For example: + +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\%G\%T\%C.html" +``` + +Assuming you are exporting a channel named `"My channel"` in a category `"Text channels"` from a guild called `"My guild"`, you will get the following output file path: `"C:\Discord Exports\My guild\Text channels\My channel.html"` + +Here is the full list of template tokens that get replaced with their corresponding values: + +- `%g` - guild ID +- `%G` - guild name +- `%t` - category ID +- `%T` - category name +- `%c` - channel ID +- `%C` - channel name +- `%p` - channel position +- `%P` - category position +- `%a` - the "after" date +- `%b` - the "before" date + ### Partitioning ↴ You can use partitioning to split files after a given number of messages.
For example, a channel with 36 messages set to be partitioned every 10 messages will output 4 files.