mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-07-09 15:39:34 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1181a35f08 | |||
| 4a62f9c34f | |||
| b6e1f92989 | |||
| 0d3d2ddcf0 | |||
| 9afecd47bd | |||
| 5cec162b4e | |||
| 6647f90ced | |||
| b9a3001c11 | |||
| dadfe5b8ef | |||
| 4f29fa63d0 | |||
| 54b0174bde |
+2
-2
@@ -17,7 +17,7 @@ Note the `:stable` tag. DiscordChatExporter images are tagged according to the f
|
|||||||
|
|
||||||
- `stable` — latest stable version release. This tag is updated with each release of a new project version. Recommended for personal use.
|
- `stable` — latest stable version release. This tag is updated with each release of a new project version. Recommended for personal use.
|
||||||
- `x.y.z` (e.g. `2.30.1`) — specific stable version release. This tag is pushed when the corresponding version is released and never updated thereafter. Recommended for use in automation scenarios.
|
- `x.y.z` (e.g. `2.30.1`) — specific stable version release. This tag is pushed when the corresponding version is released and never updated thereafter. Recommended for use in automation scenarios.
|
||||||
- `latest` — latest (potentially unstable) build. This tag is updated with each new commit to the `master` branch. Not recommended, unless you want to test a new feature that has not been released in a stable version yet.
|
- `latest` — latest (potentially unstable) build. This tag is updated with each new commit to the `prime` branch. Not recommended, unless you want to test a new feature that has not been released in a stable version yet.
|
||||||
|
|
||||||
You can see all available tags [here](https://hub.docker.com/r/tyrrrz/discordchatexporter/tags?ordering=name).
|
You can see all available tags [here](https://hub.docker.com/r/tyrrrz/discordchatexporter/tags?ordering=name).
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ You can also use the current working directory as the output directory by specif
|
|||||||
- `-v $PWD:/out` in Bash
|
- `-v $PWD:/out` in Bash
|
||||||
- `-v $pwd.Path:/out` in PowerShell
|
- `-v $pwd.Path:/out` in PowerShell
|
||||||
|
|
||||||
For more information, please refer to the [Dockerfile](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/DiscordChatExporter.Cli.dockerfile) and [Docker documentation](https://docs.docker.com/engine/reference/run).
|
For more information, please refer to the [Dockerfile](https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/DiscordChatExporter.Cli.dockerfile) and [Docker documentation](https://docs.docker.com/engine/reference/run).
|
||||||
|
|
||||||
To get your Token and Channel IDs, please refer to [this page](Token-and-IDs.md).
|
To get your Token and Channel IDs, please refer to [this page](Token-and-IDs.md).
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
|
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
|
||||||
|
|
||||||
TOKEN=tokenhere
|
TOKEN=tokenhere
|
||||||
CHANNELID=channelhere
|
CHANNELID=channelhere
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
|
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
|
||||||
|
|
||||||
TOKEN=tokenhere
|
TOKEN=tokenhere
|
||||||
CHANNELID=channelhere
|
CHANNELID=channelhere
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
1. Open a text editor such as Notepad and paste:
|
1. Open a text editor such as Notepad and paste:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
|
# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
|
||||||
|
|
||||||
$TOKEN = "tokenhere"
|
$TOKEN = "tokenhere"
|
||||||
$CHANNEL = "channelhere"
|
$CHANNEL = "channelhere"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
|
|||||||
3. Type
|
3. Type
|
||||||
|
|
||||||
```js
|
```js
|
||||||
let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.$8&&x.exports.LP&&x.exports.gK){m=x;break}}}]);m&&console.log("Token:",m.exports.LP());
|
let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.getToken){m=x;break}}}]);m&&console.log("Token:",m.exports.getToken());
|
||||||
```
|
```
|
||||||
|
|
||||||
into the console and press <kbd>Enter</kbd>. The console will display your user token.
|
into the console and press <kbd>Enter</kbd>. The console will display your user token.
|
||||||
@@ -120,7 +120,7 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
|
|||||||
1. Type
|
1. Type
|
||||||
|
|
||||||
```js
|
```js
|
||||||
let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.$8&&x.exports.LP&&x.exports.gK){m=x;break}}}]);m&&console.log("Token:",m.exports.LP());
|
let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.getToken){m=x;break}}}]);m&&console.log("Token:",m.exports.getToken());
|
||||||
```
|
```
|
||||||
|
|
||||||
into the console and press <kbd>Enter</kbd>. The console will display your user token.
|
into the console and press <kbd>Enter</kbd>. The console will display your user token.
|
||||||
|
|||||||
+11
-12
@@ -29,21 +29,20 @@ Type the following command in your terminal of choice, then press ENTER to run i
|
|||||||
> **Note**:
|
> **Note**:
|
||||||
> On Windows, if you're using the default Command Prompt (`cmd`), omit the leading `./` at the start of the command.
|
> On Windows, if you're using the default Command Prompt (`cmd`), omit the leading `./` at the start of the command.
|
||||||
|
|
||||||
|
|
||||||
> **Docker** users, please refer to the [Docker usage instructions](Docker.md).
|
> **Docker** users, please refer to the [Docker usage instructions](Docker.md).
|
||||||
|
|
||||||
## CLI commands
|
## CLI commands
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|-------------------------|------------------------------------------------------|
|
| ----------- | ---------------------------------------------------- |
|
||||||
| export | Exports a channel |
|
| export | Exports a channel |
|
||||||
| exportdm | Exports all direct message channels |
|
| exportdm | Exports all direct message channels |
|
||||||
| exportguild | Exports all channels within the specified server |
|
| exportguild | Exports all channels within the specified server |
|
||||||
| exportall | Exports all accessible channels |
|
| exportall | Exports all accessible channels |
|
||||||
| channels | Outputs the list of channels in the given server |
|
| channels | Outputs the list of channels in the given server |
|
||||||
| dm | Outputs the list of direct message channels |
|
| dm | Outputs the list of direct message channels |
|
||||||
| guilds | Outputs the list of accessible servers |
|
| guilds | Outputs the list of accessible servers |
|
||||||
| guide | Explains how to obtain token, server, and channel ID |
|
| guide | Explains how to obtain token, server, and 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](Token-and-IDs.md), or run `./DiscordChatExporter.Cli guide`.
|
To use the commands, you'll need a token. For the instructions on how to get a token, please refer to [this page](Token-and-IDs.md), or run `./DiscordChatExporter.Cli guide`.
|
||||||
|
|
||||||
@@ -222,7 +221,7 @@ Use `--filter` to filter what messages are included in the export.
|
|||||||
./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --filter "from:Tyrrrz has:image"
|
./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --filter "from:Tyrrrz has:image"
|
||||||
```
|
```
|
||||||
|
|
||||||
Documentation on message filter syntax can be found [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Message-filters.md).
|
Documentation on message filter syntax can be found [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs/Message-filters.md).
|
||||||
|
|
||||||
### Export channels from a specific server
|
### Export channels from a specific server
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: ⚠ Feature request
|
- name: ⚠ Feature request
|
||||||
url: https://github.com/Tyrrrz/.github/blob/master/docs/project-status.md
|
url: https://github.com/Tyrrrz/.github/blob/prime/docs/project-status.md
|
||||||
about: Sorry, but this project is in maintenance mode and no longer accepts new feature requests.
|
about: Sorry, but this project is in maintenance mode and no longer accepts new feature requests.
|
||||||
- name: 📖 Documentation
|
- name: 📖 Documentation
|
||||||
url: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
|
url: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
|
||||||
about: Find usage guides and frequently asked questions.
|
about: Find usage guides and frequently asked questions.
|
||||||
- name: 🗨 Discussions
|
- name: 🗨 Discussions
|
||||||
url: https://github.com/Tyrrrz/DiscordChatExporter/discussions/new
|
url: https://github.com/Tyrrrz/DiscordChatExporter/discussions/new
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- prime
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- prime
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Outputs from this job aren't really used, but it's here to verify that the Dockerfile builds correctly
|
# Outputs from this job aren't really used, but it's here to verify that the Dockerfile builds correctly
|
||||||
@@ -37,15 +37,15 @@ jobs:
|
|||||||
--output type=tar,dest=DiscordChatExporter.Cli.Docker.tar
|
--output type=tar,dest=DiscordChatExporter.Cli.Docker.tar
|
||||||
|
|
||||||
- name: Upload image
|
- name: Upload image
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
with:
|
with:
|
||||||
name: DiscordChatExporter.Cli.Docker
|
name: DiscordChatExporter.Cli.Docker
|
||||||
path: DiscordChatExporter.Cli.Docker.tar
|
path: DiscordChatExporter.Cli.Docker.tar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
# Deploy to DockerHub only on tag push or master branch push
|
# Deploy to DockerHub only on tag push or prime branch push
|
||||||
if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'master' }}
|
if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'prime' }}
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- prime
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- prime
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||||
@@ -135,7 +135,7 @@ jobs:
|
|||||||
--self-contained
|
--self-contained
|
||||||
|
|
||||||
- name: Upload app binaries
|
- name: Upload app binaries
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
||||||
path: ${{ matrix.app }}/bin/publish/
|
path: ${{ matrix.app }}/bin/publish/
|
||||||
@@ -200,7 +200,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download app binaries
|
- name: Download app binaries
|
||||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
name: ${{ matrix.asset }}.${{ matrix.rid }}
|
||||||
path: ${{ matrix.app }}/
|
path: ${{ matrix.app }}/
|
||||||
|
|||||||
+15
-15
@@ -5,16 +5,16 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="AngleSharp" Version="1.4.0" />
|
<PackageVersion Include="AngleSharp" Version="1.4.0" />
|
||||||
<PackageVersion Include="AsyncImageLoader.Avalonia" Version="3.5.0" />
|
<PackageVersion Include="AsyncImageLoader.Avalonia" Version="3.6.0" />
|
||||||
<PackageVersion Include="AsyncKeyedLock" Version="8.0.1" />
|
<PackageVersion Include="AsyncKeyedLock" Version="8.0.2" />
|
||||||
<PackageVersion Include="Avalonia" Version="11.3.11" />
|
<PackageVersion Include="Avalonia" Version="11.3.12" />
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.11" />
|
<PackageVersion Include="Avalonia.Desktop" Version="11.3.12" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.11" />
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.12" />
|
||||||
<PackageVersion Include="CliFx" Version="2.3.6" />
|
<PackageVersion Include="CliFx" Version="2.3.6" />
|
||||||
<PackageVersion Include="Cogwheel" Version="2.1.0" />
|
<PackageVersion Include="Cogwheel" Version="2.1.0" />
|
||||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
|
<PackageVersion Include="coverlet.collector" Version="8.0.0" />
|
||||||
<PackageVersion Include="CSharpier.MsBuild" Version="1.2.5" />
|
<PackageVersion Include="CSharpier.MsBuild" Version="1.2.6" />
|
||||||
<PackageVersion Include="Deorcify" Version="1.1.0" />
|
<PackageVersion Include="Deorcify" Version="1.1.0" />
|
||||||
<PackageVersion Include="ThisAssembly.Project" Version="2.1.2" />
|
<PackageVersion Include="ThisAssembly.Project" Version="2.1.2" />
|
||||||
<PackageVersion Include="DialogHost.Avalonia" Version="0.10.4" />
|
<PackageVersion Include="DialogHost.Avalonia" Version="0.10.4" />
|
||||||
@@ -22,22 +22,22 @@
|
|||||||
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.1" />
|
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.1" />
|
||||||
<PackageVersion Include="Gress" Version="2.1.1" />
|
<PackageVersion Include="Gress" Version="2.1.1" />
|
||||||
<PackageVersion Include="JsonExtensions" Version="1.2.0" />
|
<PackageVersion Include="JsonExtensions" Version="1.2.0" />
|
||||||
<PackageVersion Include="Markdig" Version="1.0.0" />
|
<PackageVersion Include="Markdig" Version="1.0.1" />
|
||||||
<PackageVersion Include="Material.Avalonia" Version="3.9.2" />
|
<PackageVersion Include="Material.Avalonia" Version="3.9.2" />
|
||||||
<PackageVersion Include="Material.Icons.Avalonia" Version="2.2.0" />
|
<PackageVersion Include="Material.Icons.Avalonia" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.2" />
|
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.3" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.2" />
|
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.3" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.2" />
|
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.3" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
|
||||||
<PackageVersion Include="Onova" Version="2.6.13" />
|
<PackageVersion Include="Onova" Version="2.6.13" />
|
||||||
<PackageVersion Include="Polly" Version="8.6.5" />
|
<PackageVersion Include="Polly" Version="8.6.5" />
|
||||||
<PackageVersion Include="RazorBlade" Version="0.11.0" />
|
<PackageVersion Include="RazorBlade" Version="0.11.0" />
|
||||||
<PackageVersion Include="Spectre.Console" Version="0.54.0" />
|
<PackageVersion Include="Spectre.Console" Version="0.54.0" />
|
||||||
<PackageVersion Include="Superpower" Version="3.1.0" />
|
<PackageVersion Include="Superpower" Version="3.1.0" />
|
||||||
<PackageVersion Include="WebMarkupMin.Core" Version="2.20.1" />
|
<PackageVersion Include="WebMarkupMin.Core" Version="2.20.2" />
|
||||||
<PackageVersion Include="xunit" Version="2.9.3" />
|
<PackageVersion Include="xunit" Version="2.9.3" />
|
||||||
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
|
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
|
||||||
<PackageVersion Include="YoutubeExplode" Version="6.5.6" />
|
<PackageVersion Include="YoutubeExplode" Version="6.5.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class GuideCommand : ICommand
|
|||||||
using (console.WithForegroundColor(ConsoleColor.DarkCyan))
|
using (console.WithForegroundColor(ConsoleColor.DarkCyan))
|
||||||
{
|
{
|
||||||
console.Output.WriteLine(
|
console.Output.WriteLine(
|
||||||
"https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs"
|
"https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ public class App : Application, IDisposable
|
|||||||
private readonly SettingsService _settingsService;
|
private readonly SettingsService _settingsService;
|
||||||
private readonly MainViewModel _mainViewModel;
|
private readonly MainViewModel _mainViewModel;
|
||||||
|
|
||||||
|
private bool _isDisposed;
|
||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
@@ -98,8 +100,24 @@ public class App : Application, IDisposable
|
|||||||
public override void OnFrameworkInitializationCompleted()
|
public override void OnFrameworkInitializationCompleted()
|
||||||
{
|
{
|
||||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
desktop.MainWindow = new MainView { DataContext = _mainViewModel };
|
desktop.MainWindow = new MainView { DataContext = _mainViewModel };
|
||||||
|
|
||||||
|
void OnExit(object? sender, ControlledApplicationLifetimeExitEventArgs args)
|
||||||
|
{
|
||||||
|
if (sender is IControlledApplicationLifetime lifetime)
|
||||||
|
lifetime.Exit -= OnExit;
|
||||||
|
|
||||||
|
Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Although `App.Dispose()` is invoked from `Program.Main(...)`, on some platforms
|
||||||
|
// it may be called too late in the shutdown lifecycle. Attach an exit
|
||||||
|
// handler to ensure timely disposal as a safeguard.
|
||||||
|
// https://github.com/Tyrrrz/YoutubeDownloader/issues/795
|
||||||
|
desktop.Exit += OnExit;
|
||||||
|
}
|
||||||
|
|
||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
|
||||||
// Set up custom theme colors
|
// Set up custom theme colors
|
||||||
@@ -115,6 +133,11 @@ public class App : Application, IDisposable
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
if (_isDisposed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_isDisposed = true;
|
||||||
|
|
||||||
_eventRoot.Dispose();
|
_eventRoot.Dispose();
|
||||||
_services.Dispose();
|
_services.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public partial class LocalizationManager
|
|||||||
* Your bot needs to have the **Message Content Intent** enabled to read messages
|
* Your bot needs to have the **Message Content Intent** enabled to read messages
|
||||||
""",
|
""",
|
||||||
[nameof(TokenHelpText)] =
|
[nameof(TokenHelpText)] =
|
||||||
"If you have questions or issues, please refer to the [documentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/master/.docs)",
|
"If you have questions or issues, please refer to the [documentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/prime/.docs)",
|
||||||
// Settings
|
// Settings
|
||||||
[nameof(SettingsTitle)] = "Settings",
|
[nameof(SettingsTitle)] = "Settings",
|
||||||
[nameof(ThemeLabel)] = "Theme",
|
[nameof(ThemeLabel)] = "Theme",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public partial class LocalizationManager
|
|||||||
* Votre bot doit avoir l'option **Message Content Intent** activée pour lire les messages
|
* Votre bot doit avoir l'option **Message Content Intent** activée pour lire les messages
|
||||||
""",
|
""",
|
||||||
[nameof(TokenHelpText)] =
|
[nameof(TokenHelpText)] =
|
||||||
"Pour les questions ou problèmes, veuillez consulter la [documentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/master/.docs)",
|
"Pour les questions ou problèmes, veuillez consulter la [documentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/prime/.docs)",
|
||||||
// Settings
|
// Settings
|
||||||
[nameof(SettingsTitle)] = "Paramètres",
|
[nameof(SettingsTitle)] = "Paramètres",
|
||||||
[nameof(ThemeLabel)] = "Thème",
|
[nameof(ThemeLabel)] = "Thème",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public partial class LocalizationManager
|
|||||||
* Ihr Bot benötigt die aktivierte **Message Content Intent**, um Nachrichten zu lesen
|
* Ihr Bot benötigt die aktivierte **Message Content Intent**, um Nachrichten zu lesen
|
||||||
""",
|
""",
|
||||||
[nameof(TokenHelpText)] =
|
[nameof(TokenHelpText)] =
|
||||||
"Bei Fragen oder Problemen lesen Sie die [Dokumentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/master/.docs)",
|
"Bei Fragen oder Problemen lesen Sie die [Dokumentation](https://github.com/Tyrrrz/DiscordChatExporter/tree/prime/.docs)",
|
||||||
// Settings
|
// Settings
|
||||||
[nameof(SettingsTitle)] = "Einstellungen",
|
[nameof(SettingsTitle)] = "Einstellungen",
|
||||||
[nameof(ThemeLabel)] = "Design",
|
[nameof(ThemeLabel)] = "Design",
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public partial class LocalizationManager
|
|||||||
* Tu bot necesita tener habilitado **Message Content Intent** para leer mensajes
|
* Tu bot necesita tener habilitado **Message Content Intent** para leer mensajes
|
||||||
""",
|
""",
|
||||||
[nameof(TokenHelpText)] =
|
[nameof(TokenHelpText)] =
|
||||||
"Si tienes preguntas o problemas, consulta la [documentación](https://github.com/Tyrrrz/DiscordChatExporter/tree/master/.docs)",
|
"Si tienes preguntas o problemas, consulta la [documentación](https://github.com/Tyrrrz/DiscordChatExporter/tree/prime/.docs)",
|
||||||
// Settings
|
// Settings
|
||||||
[nameof(SettingsTitle)] = "Ajustes",
|
[nameof(SettingsTitle)] = "Ajustes",
|
||||||
[nameof(ThemeLabel)] = "Tema",
|
[nameof(ThemeLabel)] = "Tema",
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public partial class LocalizationManager
|
|||||||
* Ваш бот повинен мати включений **Message Content Intent** для читання повідомлень
|
* Ваш бот повинен мати включений **Message Content Intent** для читання повідомлень
|
||||||
""",
|
""",
|
||||||
[nameof(TokenHelpText)] =
|
[nameof(TokenHelpText)] =
|
||||||
"Якщо у вас є запитання або проблеми, зверніться до [документації](https://github.com/Tyrrrz/DiscordChatExporter/tree/master/.docs)",
|
"Якщо у вас є запитання або проблеми, зверніться до [документації](https://github.com/Tyrrrz/DiscordChatExporter/tree/prime/.docs)",
|
||||||
// Settings
|
// Settings
|
||||||
[nameof(SettingsTitle)] = "Налаштування",
|
[nameof(SettingsTitle)] = "Налаштування",
|
||||||
[nameof(ThemeLabel)] = "Тема",
|
[nameof(ThemeLabel)] = "Тема",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public static class Program
|
|||||||
|
|
||||||
public static string ProjectReleasesUrl { get; } = $"{ProjectUrl}/releases";
|
public static string ProjectReleasesUrl { get; } = $"{ProjectUrl}/releases";
|
||||||
|
|
||||||
public static string ProjectDocumentationUrl { get; } = ProjectUrl + "/tree/master/.docs";
|
public static string ProjectDocumentationUrl { get; } = ProjectUrl + "/tree/prime/.docs";
|
||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp() =>
|
public static AppBuilder BuildAvaloniaApp() =>
|
||||||
AppBuilder.Configure<App>().UsePlatformDetect().LogToTrace();
|
AppBuilder.Configure<App>().UsePlatformDetect().LogToTrace();
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.IO;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Cogwheel;
|
using Cogwheel;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using DiscordChatExporter.Core.Discord;
|
using DiscordChatExporter.Core.Discord;
|
||||||
@@ -13,10 +11,7 @@ namespace DiscordChatExporter.Gui.Services;
|
|||||||
|
|
||||||
[ObservableObject]
|
[ObservableObject]
|
||||||
public partial class SettingsService()
|
public partial class SettingsService()
|
||||||
: SettingsBase(
|
: SettingsBase(StartOptions.Current.SettingsPath, SerializerContext.Default)
|
||||||
Path.Combine(AppContext.BaseDirectory, "Settings.dat"),
|
|
||||||
SerializerContext.Default
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
public partial bool IsUkraineSupportMessageEnabled { get; set; } = true;
|
public partial bool IsUkraineSupportMessageEnabled { get; set; } = true;
|
||||||
|
|||||||
@@ -9,24 +9,25 @@ namespace DiscordChatExporter.Gui.Services;
|
|||||||
|
|
||||||
public class UpdateService(SettingsService settingsService) : IDisposable
|
public class UpdateService(SettingsService settingsService) : IDisposable
|
||||||
{
|
{
|
||||||
private readonly IUpdateManager? _updateManager = OperatingSystem.IsWindows()
|
private readonly IUpdateManager? _updateManager =
|
||||||
? new UpdateManager(
|
OperatingSystem.IsWindows() && StartOptions.Current.IsAutoUpdateAllowed
|
||||||
new GithubPackageResolver(
|
? new UpdateManager(
|
||||||
"Tyrrrz",
|
new GithubPackageResolver(
|
||||||
"DiscordChatExporter",
|
"Tyrrrz",
|
||||||
// Examples:
|
"DiscordChatExporter",
|
||||||
// DiscordChatExporter.win-arm64.zip
|
// Examples:
|
||||||
// DiscordChatExporter.win-x64.zip
|
// DiscordChatExporter.win-arm64.zip
|
||||||
// DiscordChatExporter.linux-x64.zip
|
// DiscordChatExporter.win-x64.zip
|
||||||
$"DiscordChatExporter.{RuntimeInformation.RuntimeIdentifier}.zip"
|
// DiscordChatExporter.linux-x64.zip
|
||||||
),
|
$"DiscordChatExporter.{RuntimeInformation.RuntimeIdentifier}.zip"
|
||||||
new ZipPackageExtractor()
|
),
|
||||||
)
|
new ZipPackageExtractor()
|
||||||
: null;
|
)
|
||||||
|
: null;
|
||||||
|
|
||||||
private Version? _updateVersion;
|
private Version? _updateVersion;
|
||||||
private bool _updatePrepared;
|
private bool _isUpdatePrepared;
|
||||||
private bool _updaterLaunched;
|
private bool _isUpdaterLaunched;
|
||||||
|
|
||||||
public async ValueTask<Version?> CheckForUpdatesAsync()
|
public async ValueTask<Version?> CheckForUpdatesAsync()
|
||||||
{
|
{
|
||||||
@@ -51,7 +52,7 @@ public class UpdateService(SettingsService settingsService) : IDisposable
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _updateManager.PrepareUpdateAsync(_updateVersion = version);
|
await _updateManager.PrepareUpdateAsync(_updateVersion = version);
|
||||||
_updatePrepared = true;
|
_isUpdatePrepared = true;
|
||||||
}
|
}
|
||||||
catch (UpdaterAlreadyLaunchedException)
|
catch (UpdaterAlreadyLaunchedException)
|
||||||
{
|
{
|
||||||
@@ -71,13 +72,13 @@ public class UpdateService(SettingsService settingsService) : IDisposable
|
|||||||
if (!settingsService.IsAutoUpdateEnabled)
|
if (!settingsService.IsAutoUpdateEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_updateVersion is null || !_updatePrepared || _updaterLaunched)
|
if (_updateVersion is null || !_isUpdatePrepared || _isUpdaterLaunched)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_updateManager.LaunchUpdater(_updateVersion, needRestart);
|
_updateManager.LaunchUpdater(_updateVersion, needRestart);
|
||||||
_updaterLaunched = true;
|
_isUpdaterLaunched = true;
|
||||||
}
|
}
|
||||||
catch (UpdaterAlreadyLaunchedException)
|
catch (UpdaterAlreadyLaunchedException)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace DiscordChatExporter.Gui;
|
||||||
|
|
||||||
|
public partial class StartOptions
|
||||||
|
{
|
||||||
|
public required string SettingsPath { get; init; }
|
||||||
|
|
||||||
|
public required bool IsAutoUpdateAllowed { get; init; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class StartOptions
|
||||||
|
{
|
||||||
|
public static StartOptions Current { get; } =
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
SettingsPath =
|
||||||
|
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_SETTINGS_PATH") is { } path
|
||||||
|
&& !string.IsNullOrWhiteSpace(path)
|
||||||
|
? Path.EndsInDirectorySeparator(path) || Directory.Exists(path)
|
||||||
|
? Path.Combine(path, "Settings.dat")
|
||||||
|
: path
|
||||||
|
: Path.Combine(AppContext.BaseDirectory, "Settings.dat"),
|
||||||
|
IsAutoUpdateAllowed = !(
|
||||||
|
Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE")
|
||||||
|
is { } env
|
||||||
|
&& env.Equals("false", StringComparison.OrdinalIgnoreCase)
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -46,6 +46,9 @@ public class SettingsViewModel : DialogViewModelBase
|
|||||||
set => _settingsService.Language = value;
|
set => _settingsService.Language = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsAutoUpdateAvailable { get; } =
|
||||||
|
OperatingSystem.IsWindows() && StartOptions.Current.IsAutoUpdateAllowed;
|
||||||
|
|
||||||
public bool IsAutoUpdateEnabled
|
public bool IsAutoUpdateEnabled
|
||||||
{
|
{
|
||||||
get => _settingsService.IsAutoUpdateEnabled;
|
get => _settingsService.IsAutoUpdateEnabled;
|
||||||
|
|||||||
@@ -33,30 +33,40 @@
|
|||||||
|
|
||||||
<UniformGrid
|
<UniformGrid
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Columns="{Binding ButtonsCount}">
|
Columns="{Binding ButtonsCount}">
|
||||||
<!-- OK -->
|
<!-- OK -->
|
||||||
<Button
|
<Button
|
||||||
|
Margin="8"
|
||||||
|
HorizontalContentAlignment="Stretch"
|
||||||
Command="{Binding CloseCommand}"
|
Command="{Binding CloseCommand}"
|
||||||
Content="{Binding DefaultButtonText}"
|
|
||||||
IsDefault="True"
|
IsDefault="True"
|
||||||
IsVisible="{Binding IsDefaultButtonVisible}"
|
IsVisible="{Binding IsDefaultButtonVisible}"
|
||||||
Theme="{DynamicResource MaterialOutlineButton}">
|
Theme="{DynamicResource MaterialOutlineButton}"
|
||||||
|
ToolTip.Tip="{Binding DefaultButtonText}">
|
||||||
<Button.CommandParameter>
|
<Button.CommandParameter>
|
||||||
<system:Boolean>True</system:Boolean>
|
<system:Boolean>True</system:Boolean>
|
||||||
</Button.CommandParameter>
|
</Button.CommandParameter>
|
||||||
|
<TextBlock
|
||||||
|
Text="{Binding DefaultButtonText}"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextTrimming="CharacterEllipsis" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Cancel -->
|
<!-- Cancel -->
|
||||||
<Button
|
<Button
|
||||||
Margin="16,0,0,0"
|
Margin="8"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
Command="{Binding CloseCommand}"
|
Command="{Binding CloseCommand}"
|
||||||
Content="{Binding CancelButtonText}"
|
|
||||||
IsCancel="True"
|
IsCancel="True"
|
||||||
IsVisible="{Binding IsCancelButtonVisible}"
|
IsVisible="{Binding IsCancelButtonVisible}"
|
||||||
Theme="{DynamicResource MaterialOutlineButton}" />
|
Theme="{DynamicResource MaterialOutlineButton}"
|
||||||
|
ToolTip.Tip="{Binding CancelButtonText}">
|
||||||
|
<TextBlock
|
||||||
|
Text="{Binding CancelButtonText}"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextTrimming="CharacterEllipsis" />
|
||||||
|
</Button>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -50,8 +50,7 @@
|
|||||||
<!-- Auto-updates -->
|
<!-- Auto-updates -->
|
||||||
<DockPanel
|
<DockPanel
|
||||||
Margin="16,8"
|
Margin="16,8"
|
||||||
IsVisible="{OnPlatform False,
|
IsVisible="{Binding IsAutoUpdateAvailable}"
|
||||||
Windows=True}"
|
|
||||||
LastChildFill="False"
|
LastChildFill="False"
|
||||||
ToolTip.Tip="{Binding LocalizationManager.AutoUpdateTooltip}">
|
ToolTip.Tip="{Binding LocalizationManager.AutoUpdateTooltip}">
|
||||||
<TextBlock DockPanel.Dock="Left" Text="{Binding LocalizationManager.AutoUpdateLabel}" />
|
<TextBlock DockPanel.Dock="Left" Text="{Binding LocalizationManager.AutoUpdateLabel}" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# DiscordChatExporter
|
# DiscordChatExporter
|
||||||
|
|
||||||
[](https://github.com/Tyrrrz/.github/blob/master/docs/project-status.md)
|
[](https://github.com/Tyrrrz/.github/blob/prime/docs/project-status.md)
|
||||||
[](https://tyrrrz.me/ukraine)
|
[](https://tyrrrz.me/ukraine)
|
||||||
[](https://github.com/Tyrrrz/DiscordChatExporter/actions)
|
[](https://github.com/Tyrrrz/DiscordChatExporter/actions)
|
||||||
[](https://codecov.io/gh/Tyrrrz/DiscordChatExporter)
|
[](https://codecov.io/gh/Tyrrrz/DiscordChatExporter)
|
||||||
[](https://github.com/Tyrrrz/DiscordChatExporter/releases)
|
[](https://github.com/Tyrrrz/DiscordChatExporter/releases)
|
||||||
[](https://github.com/Tyrrrz/DiscordChatExporter/releases)
|
[](https://github.com/Tyrrrz/DiscordChatExporter/releases)
|
||||||
[](https://hub.docker.com/r/tyrrrz/discordchatexporter)
|
[](https://hub.docker.com/r/tyrrrz/discordchatexporter)
|
||||||
@@ -27,7 +27,7 @@ It works with direct messages, group messages, and server channels, and supports
|
|||||||
|
|
||||||
> 💬 If you want to chat, **join my [Discord server](https://discord.gg/2SUWKFnHSm)**.
|
> 💬 If you want to chat, **join my [Discord server](https://discord.gg/2SUWKFnHSm)**.
|
||||||
|
|
||||||
## Terms of use<sup>[[?]](https://github.com/Tyrrrz/.github/blob/master/docs/why-so-political.md)</sup>
|
## Terms of use<sup>[[?]](https://github.com/Tyrrrz/.github/blob/prime/docs/why-so-political.md)</sup>
|
||||||
|
|
||||||
By using this project or its source code, for any purpose and in any shape or form, you grant your **implicit agreement** to all the following statements:
|
By using this project or its source code, for any purpose and in any shape or form, you grant your **implicit agreement** to all the following statements:
|
||||||
|
|
||||||
@@ -43,23 +43,25 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me
|
|||||||
- **Graphical user interface** (desktop app):
|
- **Graphical user interface** (desktop app):
|
||||||
- 🟢 **[Stable release](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest)**: look for `DiscordChatExporter.*.zip`
|
- 🟢 **[Stable release](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest)**: look for `DiscordChatExporter.*.zip`
|
||||||
- 🟠 [CI build](https://github.com/Tyrrrz/DiscordChatExporter/actions/workflows/main.yml): look for `DiscordChatExporter.*.zip`
|
- 🟠 [CI build](https://github.com/Tyrrrz/DiscordChatExporter/actions/workflows/main.yml): look for `DiscordChatExporter.*.zip`
|
||||||
|
- 📦 [Scoop](https://scoop.sh/#/apps?q=DiscordChatExporter&p=1&id=c71b7367623c560a2dc746b9739b9568b79b59ae): `scoop install extras/discordchatexporter` (community-maintained)
|
||||||
|
- 📦 [WinGet](https://winget.run/pkg/Tyrrrz/DiscordChatExporter.GUI): `winget install Tyrrrz.DiscordChatExporter.GUI` (community-maintained)
|
||||||
|
- 📦 [AUR](https://aur.archlinux.org/packages/discord-chat-exporter-gui): `yay -S discord-chat-exporter-gui` (community-maintained)
|
||||||
- **Command-line interface** (terminal app):
|
- **Command-line interface** (terminal app):
|
||||||
- 🟢 **[Stable release](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest)**: look for `DiscordChatExporter.Cli.*.zip`
|
- 🟢 **[Stable release](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest)**: look for `DiscordChatExporter.Cli.*.zip`
|
||||||
- 🟠 [CI build](https://github.com/Tyrrrz/DiscordChatExporter/actions/workflows/main.yml): look for `DiscordChatExporter.Cli.*.zip`
|
- 🟠 [CI build](https://github.com/Tyrrrz/DiscordChatExporter/actions/workflows/main.yml): look for `DiscordChatExporter.Cli.*.zip`
|
||||||
- 🐋 [Docker](https://hub.docker.com/r/tyrrrz/discordchatexporter): `docker pull tyrrrz/discordchatexporter`
|
- 🐋 [Docker](https://hub.docker.com/r/tyrrrz/discordchatexporter): `docker pull tyrrrz/discordchatexporter`
|
||||||
- 📦 [AUR](https://aur.archlinux.org/packages/discord-chat-exporter-cli): `discord-chat-exporter-cli`
|
- 📦 [AUR](https://aur.archlinux.org/packages/discord-chat-exporter-cli): `yay -S discord-chat-exporter-cli` (community-maintained)
|
||||||
- 📦 [Nix](https://search.nixos.org/packages?query=discordchatexporter-cli): `discordchatexporter-cli`
|
- 📦 [Nix](https://search.nixos.org/packages?show=discordchatexporter-cli): `nix-shell -p discordchatexporter-cli` (community-maintained)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> To launch the GUI version of the app on MacOS, you need to first remove the downloaded file from quarantine.
|
> To launch the GUI version of the app on MacOS, you may need to first remove the downloaded file from quarantine.
|
||||||
> You can do that by running the following command in the terminal: `xattr -rd com.apple.quarantine DiscordChatExporter.app`.
|
> You can do that by running the following command in the terminal: `xattr -rd com.apple.quarantine DiscordChatExporter.app`.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If you're unsure which build is right for your system, consult with [this page](https://useragent.cc) to determine your OS and CPU architecture.
|
> Community-maintained packages are published independently from this repository and may not always be up to date with the latest release.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> AUR and Nix packages linked above are maintained by the community.
|
> If you're unsure which build is right for your system, consult with [this page](https://useragent.cc) to determine your OS and CPU architecture.
|
||||||
> If you have any issues with them, please contact the corresponding maintainers.
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user