Skip to content

Commit

Permalink
Merge with some additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nulldg committed Sep 29, 2023
2 parents 43db23e + 89f2084 commit dd935a0
Show file tree
Hide file tree
Showing 12 changed files with 627 additions and 544 deletions.
33 changes: 17 additions & 16 deletions .docs/Dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ If you are using the CLI from Docker, installing the runtime on the host machine
- [Windows and macOS](#windows-and-macos)
- [Linux](#linux)
- [Docker](#docker)
- [Verify installation](#Verify-installation-optional)
- [Verify installation](#verify-installation-optional)

## Windows and macOS

**Download from the direct links:**
**Download directly from one of the links:**

- [.NET v7.0 Runtime for **Windows x64**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-7.0.1-windows-x64-installer)
- [.NET v7.0 Runtime for **Windows x86**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-7.0.1-windows-x86-installer)
- [.NET v7.0 Runtime for **Macs with Apple silicon**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.1-macos-arm64-installer)
- [.NET v7.0 Runtime for **Macs with an Intel processor**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.1-macos-x64-installer)
- [.NET v7.0 Runtime for **Windows x64**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-7.0.11-windows-x64-installer)
- [.NET v7.0 Runtime for **Windows x86**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-7.0.11-windows-x86-installer)
- [.NET v7.0 Runtime for **Macs with Apple silicon**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.11-macos-arm64-installer)
- [.NET v7.0 Runtime for **Macs with an Intel processor**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.11-macos-x64-installer)

> **Note**:
> [How can I tell if my computer is running a 32-bit (x86) or a 64-bit (x64) version of Windows?](https://support.microsoft.com/help/15056/windows-32-64-bit-faq)
Expand All @@ -27,20 +27,20 @@ If you are using the CLI from Docker, installing the runtime on the host machine
> [Is my Mac using an Intel processor or Apple silicon?](https://support.apple.com/HT211814)
**Otherwise:**
[Check out the latest version in this page](https://dotnet.microsoft.com/download/dotnet/7.0).
[Check out the latest version on this page](https://dotnet.microsoft.com/download/dotnet/7.0).
Look for the download link in the '**.NET Runtime**' section, under **Installers**:

[![](https://i.imgur.com/t3PB3NC.png)](https://dotnet.microsoft.com/download/dotnet/7.0)
[![Screenshot from download page](https://i.imgur.com/t3PB3NC.png)](https://dotnet.microsoft.com/download/dotnet/7.0)

## Linux

**You only need to install .NET Runtime v7.0**
Installing the .NET Runtime works differently depending on which Linux distribution you use.

Check out the instructions for your distro:

- [Ubuntu](https://docs.microsoft.com/dotnet/core/install/linux-ubuntu#supported-distributions)
- [Debian](https://docs.microsoft.com/dotnet/core/install/linux-debian#supported-distributions)
- [Fedora](https://docs.microsoft.com/dotnet/core/install/linux-fedora#supported-distributions)
- [Ubuntu](https://docs.microsoft.com/dotnet/core/install/linux-ubuntu)
- [Debian](https://docs.microsoft.com/dotnet/core/install/linux-debian)
- [Fedora](https://docs.microsoft.com/dotnet/core/install/linux-fedora)

For other distros, please check the _'Install on Linux'_ menu on the left of [this page](https://docs.microsoft.com/dotnet/core/install/linux).

Expand All @@ -51,16 +51,17 @@ You can check which version of **.NET Runtime** is installed by following these
### Step 1

**Windows:** Open Command Prompt (aka `cmd`)

**macOS and Linux:** Open `Terminal`

### Step 2

Run: `dotnet --info`
If **.NET Runtime** is correctly installed, the command will output the following:
Run `dotnet --info`

```
If the **.NET Runtime** is correctly installed, the command will output the following:

```console
.NET runtimes installed:
Microsoft.NETCore.App 7.0.x [C:\path\to\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 7.0.x [C:\path\to\dotnet\shared\Microsoft.WindowsDesktop.App]
```
```
453 changes: 6 additions & 447 deletions .docs/Getting-started.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .docs/Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please follow the [instructions provided here](https://github.com/nulldg/Discord
3. `cd` into the extracted folder. You can do this in Terminal by typing `cd`, then press the SPACE key, drag and drop the extracted folder into the Terminal window, and press the ENTER key.
4. Replace `TOKEN` and `CHANNEL`, then execute this command to export:

```
```console
dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
```

Expand Down
2 changes: 1 addition & 1 deletion .docs/MacOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Please follow the [instructions provided here](https://github.com/nulldg/Discord
3. In the Terminal window, type `cd` , press the SPACE key, then drag and drop the extracted folder into the window, then press the RETURN key.
4. Execute the following command to export, replacing `TOKEN` and `CHANNEL` with your own values:

```
```console
dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
```

Expand Down
34 changes: 17 additions & 17 deletions .docs/Message-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,98 +8,98 @@ To configure a filter, specify it in advanced export parameters when using the G

- Filter by user

```
```console
from:Tyrrrz
```

- Filter by user (with discriminator)

```
```console
from:Tyrrrz#1234
```

- Filter by message content (allowed values: `link`, `embed`, `file`, `video`, `image`, `sound`)

```
```console
has:image
```

- Filter by mentioned user (same rules apply as with `from:` filter)

```
```console
mentions:Tyrrrz#1234
```

- Filter by contained text (has word "hello" and word "world" somewhere in the message text):

```
```console
hello world
```

- Filter by contained text (has the string "hello world" somewhere in the message text):

```
```console
"hello world"
```

- Combine multiple filters ('and'):

```
```console
from:Tyrrrz has:image
```

- Same thing but with an explicit operator:

```
```console
from:Tyrrrz & has:image
```

- Combine multiple filters ('or'):

```
```console
from:Tyrrrz | from:"96-LB"
```

- Combine multiple filters using groups:

```
```console
(from:Tyrrrz | from:"96-LB") has:image
```

- Negate a filter:

```
```console
-from:Tyrrrz | -has:image
```

- Negate a grouped filter:

```
```console
-(from:Tyrrrz has:image)
```

- Escape special characters (`-` is escaped below, so it's not parsed as negation operator):

```
```console
from:96\-LB
```

## CLI Caveats

In most cases, you will need to enclose your filter in quotes (`"`) to escape characters that may have special meaning in your shell:

```
```console
DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz has:image"
```

If you need to include quotes inside the filter itself as well, use single quotes (`'`) for those instead:

```
```console
DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz 'hello world'"
```

Additionally, negated filters (those that start with `-`) may cause parsing issues even when enclosed in quotes. To avoid this, use the tilde (`~`) character instead of the dash (`-`):

```
```console
DiscordChatExporter.Cli export [...] --filter ~from:Tyrrrz
```
```
2 changes: 1 addition & 1 deletion .docs/Scheduling-Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Verify your cron time [here](https://crontab.guru).

---

**Extra information**
**Additional information**

The week starts on Sunday. 0 = SUN, 1 = MON ... 7 = SUN.

Expand Down
76 changes: 38 additions & 38 deletions .docs/Scheduling-MacOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ After copying and pasting, make sure the file/folder name is not missing. If a f
- `/Users/user/Documents/Discord\ Exports` - Correct ✓
- `/Users/user/Desktop/DiscordChatExporter` - Correct ✓

![](https://i.imgur.com/29u6Nyx.png)
![Screenshot of mac info window](https://i.imgur.com/29u6Nyx.png)

5. Save the file as `filename.sh`, not `.txt`
6. Open Terminal.app, type `chmod +x`, press the SPACE key, then drag & drop the `filename.sh` into the Terminal window and hit RETURN. You may be prompted for your password, and you won't be able to see it as you type.
Expand All @@ -101,13 +101,13 @@ Open TextEdit, make a Plain Text (⇧⌘T) and then paste the following into it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.discordchatexporter</string>
<key>Program</key>
<string>/path/to/filename.sh</string>
REPLACEME
</dict>
<dict>
<key>Label</key>
<string>local.discordchatexporter</string>
<key>Program</key>
<string>/path/to/filename.sh</string>
REPLACEME
</dict>
</plist>
```

Expand Down Expand Up @@ -138,16 +138,16 @@ The following example is to export every 3600 seconds (1 hour), replace the inte
```xml
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>0</integer>
<key>Month</key>
<integer>0</integer>
<key>Day</key>
<integer>0</integer>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
<key>Weekday</key>
<integer>0</integer>
<key>Month</key>
<integer>0</integer>
<key>Day</key>
<integer>0</integer>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
```

Expand Down Expand Up @@ -175,10 +175,10 @@ Export everyday at 5:15 PM:
```xml
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>17</integer>
<key>Minute</key>
<integer>15</integer>
<key>Hour</key>
<integer>17</integer>
<key>Minute</key>
<integer>15</integer>
</dict>

```
Expand All @@ -188,8 +188,8 @@ Every 15 minutes of an hour (xx:15):
```xml
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>15</integer>
<key>Minute</key>
<integer>15</integer>
</dict>

```
Expand All @@ -199,20 +199,20 @@ Every Sunday at midnight and every Wednesday full hour (xx:00). Notice the inclu
```xml
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Weekday</key>
<integer>0</integer>
<key>Hour</key>
<integer>00</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>0</integer>
<key>Hour</key>
<integer>00</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
</array>
```

Expand Down
8 changes: 5 additions & 3 deletions .docs/Scheduling-Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ exit

Make sure not to delete the quotes (")

3. Save the file as `filename.ps1` not `.txt`
3. Save the file as `filename.ps1`, not as `.txt`

> **Note**: You can also modify the script to use other options, such as `include-threads` or switch to a different command, e. g. `exportguild`.
## Export at Startup

Expand All @@ -49,14 +51,14 @@ Make sure not to delete the quotes (")

## Scheduling with Task Scheduler

Please notice your computer must be turned on so the exportation can occur.
Please note that your computer must be turned on for the export to happen.

1. Press Windows + R, type `taskschd.msc` and press ENTER
2. Select `Task Scheduler Library`, create a Basic Task, and follow the instructions on-screen

<img src="https://i.imgur.com/MHRVGDi.png" height="500"/>

[ ![](https://i.imgur.com/m2DKhA8.png) ](https://i.imgur.com/3gHkF0t.png)
![Screenshot from Task Scheduler](https://i.imgur.com/m2DKhA8.png)

3. At 'Start a Program', write `powershell -file -ExecutionPolicy ByPass -WindowStyle Hidden "C:\path\to\filename.ps1"` in the Program/script text box

Expand Down
Loading

0 comments on commit dd935a0

Please sign in to comment.