diff --git a/GUI,-CLI-and-Formats-explained.md b/GUI,-CLI-and-Formats-explained.md new file mode 100644 index 0000000..39042b1 --- /dev/null +++ b/GUI,-CLI-and-Formats-explained.md @@ -0,0 +1,312 @@ + + +* [GUI or CLI?](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#gui-or-cli) +* [Using the GUI](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-the-gui) +* [Using the CLI](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-the-cli) + * [Command List](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#dcecli-commands) +* [Which File Format to use?](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#file-formats) + * [HTML](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#html) + * [TXT](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#txt) + * [CSV](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#csv) + +# GUI or CLI? +![](https://i.imgur.com/5MwIcpT.png) +**DiscordChatExporter** (DCE for short) has two different versions: +* **Guided User Interface** (**GUI**) - it's the preferred version as it provides ease of use. You can get it by [downloading](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) the `DiscordChatExporter.zip` file. +* **Command Line Interface** (**CLI**) - offers greater flexibility and more features for advanced users, such as export scheduling, ID lists, and more specific date ranges. You can get it by [downloading](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) the `DiscordChatExporter.CLI.zip` file. + +If you're not comfortable with **Windows'** Command Line (cmd), please choose the GUI.
+**macOS** users can only use the CLI version.
+**Linux** users may be able run the GUI version, but with some constraints. + +**(Skip to [Using the CLI](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-the-cli))** +# Using the GUI +**1.** After extracting the `.zip`, open `DiscordChatExporter.exe` + +**2.** Paste your token in the upper text box and hit ENTER, or click the arrow (→). Please refer to the on-screen instructions to get your token.
+**NEVER SHARE YOUR TOKEN**. A token gives full access to an account, treat it like a password. + +![](https://i.imgur.com/he1I3yP.png) + +**3.** DCE will display your Direct Messages and a sidebar with your server list. Select the channel you would like to export, then click the ![](https://i.imgur.com/dnTOlDa.png) button to continue.
+> 💡 Tip: You can export multiple channels at once by holding `CTRL` or `SHIFT` while selecting.
+ + + +![](https://i.imgur.com/zZMoBqL.png) + +**4.** In this screen you can customize the following: +* **Export format** - HTML (Dark), HTML (Light), TXT and CSV +* **Date range** - (Optional) Only exports messages sent in the provided date range. Only one value is required if you want to use this option. + > Please notice that the time defaults to **12:00 AM**. This means that if you choose to export between Sep 17th and Sep 18th, messages from the 18th won't be exported. +* **Partitioning** - (Optional) Splits 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. + +**5.** Click `EXPORT` to export. + +![](https://i.imgur.com/CwA31hD.png) + +**Date formats**
+You can customize how dates are formatted in the exported files at the settings menu (![](https://i.imgur.com/0K3tt1M.png)).
+* The default one is `17-Sep-19 11:34 PM` - `dd-MMM-yy hh:mm tt`
+* To change it to `09-17-19 11:34 PM` use `MM-dd-yy hh:mm tt`
+* To change it to `17-09-2019 23:34` use `dd-MM-yyyy HH:mm`
+* To change it to `2019-09-17 23:34:05.6534` use `yyyy-MM-dd HH:mm:ss.ffff`
+ +More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). + +# Using the CLI +If you're using [macOS](https://github.com/Tyrrrz/DiscordChatExporter/wiki/macOS-usage-instructions) or [Linux](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Linux-usage-instructions), please follow the installation instructions before running the commands bellow.
+ +**1.** After extracting the `.zip`, open `cmd` (`Terminal` on **macOS** and **Linux**). + +**2.** Change the current directory to DCE's folder with `cd C:\path\to\directory`. +

+**Windows** users can quickly get the directory's path by clicking the address bar while inside the folder.
+![](https://i.imgur.com/XncnhC2.gif)

+**macOS** users can select the `.exe`, hit Command+I (⌘I) and copy what's after `Where:` to get the directory
+![](https://camo.githubusercontent.com/3c51a904b0099c9f68a4797461d4a7914902fc04/68747470733a2f2f692e696d6775722e636f6d2f323975364e79782e706e67)

+You can also drag and drop the folder on **every platform**.
+![](https://i.imgur.com/sOpZQAb.gif) + + + +**3.** Let's start by listing the available commands: +```powershell +DiscordChatExporter.Cli.exe +``` + +**macOS and Linux** users must write `mono` before every command: +```powershell +mono DiscordChatExporter.Cli.exe +``` + +**Docker** users, please refer to the [Docker usage instructions](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Docker-usage-instructions). + +## DCE.CLI Commands + +| Command | Description | +| ------- | ----------- | +[export](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#export) | Export a channel +[exportdm](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#exportdm) | Export all direct message channels +[exportguild](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#exportguild) | Export all channels within specified server +[channels](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#channels) | Outputs the list of channels in the given server +[dm](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#dm) | Outputs the list of direct message channels +[guilds](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#guilds) | Outputs the list of accessible servers +[guide](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#guide) | Explains how to obtain token, guild or channel ID + +To use the commands, you'll need a token. For the instructions on how to get a token, please refer to [this page](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs), or run `DiscordChatExporter.Cli.exe guide`. +To get help about a specific command, please run: +```powershell +DiscordChatExporter.Cli.exe -h command +``` + +## export + +||Option | Description +|--|------- | ------------- +|**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot +|**\***|[-c](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-guild-id-or-guild-channel-id) +||[-f](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-format) | [Output file format](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#file-formats) +||[-o](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-output-filename) | Output file or directory path +||[-p](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#partitioning) | Split output into partitions limited to this number of messages +||[--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-formats) | Date format used in output +||[--after](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges)| Limit to messages sent after this date +||[--before](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges) | Limit to messages sent before this date + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter. + +With this command you can export Server Channels and Direct Messages. + +### Basic usage +You can quickly export with DCE's default settings by using just `-t token` and `-c channelid` +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 +``` + +### Using a Bot Token +Add `-b` +```powershell +DiscordChatExporter.Cli.exe export -t "Mjg5ODIz" -b -c 53555 +``` + +### Changing the format +You can change the export format to `HtmlDark`, `HtmlLight`, `Txt` or `Csv` by using `-f format` +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -f txt +``` + +### Changing the output filename +You can change the filename by using `-o name` +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -o myserver +``` + +### Changing the output directory +You can change the export directory by using `-o`
+If any of the folders has a space in its name, add quotes (") +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports" +``` + +### Changing the filename and output directory +You can change both the filename and export directory by using `-o directory\name`
+If any of the folders has a space in its name, add quotes (") +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\myserver" +``` + +### 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 +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 -p 10 +``` +### Date formats +This setting will change how dates are formatted in the exported files.
+* The default one is `17-Sep-19 11:34 PM` - `dd-MMM-yy hh:mm tt`
+* To change it to `09-17-19 11:34 PM` use `MM-dd-yy hh:mm tt`
+* To change it to `17-09-2019 23:34` use `dd-MM-yyyy HH:mm`
+* To change it to `2019-09-17 23:34:05.6534` use `yyyy-MM-dd HH:mm:ss.ffff`
+ + +More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). + +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 --dateformat "yyyy-MM-dd HH:mm" +``` + +### Date ranges +**Messages sent before a date**
+Use `--before` to export messages sent before the provided date. E.g. messages sent before September 18th 2019: +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 --before 2019-09-18 +``` +**Messages sent after a date**
+Use `--after` to export messages sent after the provided date. E.g. messages sent after September 17th 2019 11:34 PM: +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 --after "2019-09-18 23:34" +``` +**Messages sent in a date range**
+Use `--before` and `--after` to export messages sent at the provided date range. E.g. messages sent between September 17th 2019 11:34 PM and September 18th: +```powershell +DiscordChatExporter.Cli.exe export -t "mfa.Ifrn" -c 53555 --after "2019-09-18 23:34" --before "2019-09-18" +``` + +You can try different formats like `17-SEP-2019 11:34 PM` or even refine your ranges down to milliseconds `17-SEP-2019 23:45:30.6170`!
+Don't forget to quote (") the date if it has spaces!
+More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). + + +## exportdm +||Option | Description +|-|------- | ------------- +**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot +||[-f](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-format) | [Output file format](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#file-formats) +||[-o](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-output-filename) | Output file or directory path +||[-p](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#partitioning) | Split output into partitions limited to this number of messages +||[--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-formats) | Date format used in output +||[--after](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges) | Limit to messages sent after this date +||[--before](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges) | Limit to messages sent before this date + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
+ +This command exports all your Direct Messages. + + +## exportguild +||Option | Description +|-|------- | ------------- +|**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot +|**\***|-g | [Server ID](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-guild-id-or-guild-channel-id) +||[-f](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-format) | [Output file format](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#file-formats) +||[-o](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#changing-the-output-filename) | Output file or directory path +||[-p](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#partitioning) | Split output into partitions limited to this number of messages +||[--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-formats) | Date format used in output +||[--after](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges) | Limit to messages sent after this date +||[--before](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#date-ranges) | Limit to messages sent before this date + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
+ +This command exports all channels of a Server. + +## channels +||Option | Description +|-|------- | ------------- +**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage)| [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot +**\***|-g| [Server ID](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-guild-id-or-guild-channel-id) + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
+ +This command outputs a list of channels a Server has.
+To save the output to a file, run the command below. If the file already exists, it will be overwritten. +```powershell +DiscordChatExporter.exe channels -t "mfa.Ifrn" -g 21814 > C:\path\to\output.txt +``` + +## dm +||Option | Description +|-|------- | ------------- +**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
+ +This command outputs the list of Direct Messages.
+To save the output to a file, run the command below. If the file already exists, it will be overwritten. +```powershell +DiscordChatExporter.exe dm -t "mfa.Ifrn" > C:\path\to\output.txt +``` + + +## guilds +||Option | Description +|-|------- | ------------- +**\***|[-t](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-user-token) +||[-b](https://github.com/Tyrrrz/DiscordChatExporter/wiki/GUI%2C-CLI-and-Formats-explained#using-a-bot-token) | Whether this authorization token belongs to a bot + +> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
+ +This command outputs a list of your Server List.
+To save the output to a file, run the command below. If the file already exists, it will be overwritten. +```powershell +DiscordChatExporter.exe guilds -t "mfa.Ifrn" > C:\path\to\output.txt +``` + +## guide +This command explains [how to get your token, guild or channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs). + +# File formats + +## HTML + +![](https://i.imgur.com/ByavltV.png) +The HTML format replicates Discord's interface, making it the most user-friendly option. It's the best format for sharing and attachment preview.
+You can open HTML files with a web browser, such as Google Chrome.
+> Please notice that if the picture is deleted, or if a user changes its avatar, the images won't show up anymore.
+[Save images for offline viewing to avoid this problem](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Storing-HTML-locally)!
+![](https://i.imgur.com/9uAHT3o.png) + +## TXT + +![](https://i.imgur.com/WrNsIOn.png) + +The TXT format is the best option for archiving due to its small size.
+You can open TXT files with text editors, such as Notepad. + +## CSV + +![](https://i.imgur.com/RcJjXCF.png) +![](https://i.imgur.com/j6VVSZu.png) + +The CSV format allows for easy parsing of the chat log.
+You can open CSV files with text editors, such as Notepad, or spreadsheet programs, like Microsoft Excel and Google Sheets. + + + +# +Further reading: [Storing images locally for offline viewing](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Storing-HTML-locally), [.NET date formats](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings)
+Special thanks to [@RenanYudi](https://github.com/RenanYudi) \ No newline at end of file