Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hexahigh committed Oct 30, 2023
2 parents be83bb4 + fd1bf4b commit 496e3ef
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/build&release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
outputs:
asset_paths: "dht-dce-windows-386,dht-dce-windows-amd64,dht-dce-linux-386,dht-dce-linux-amd64"
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.3

- name: Check out code
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

- name: Build windows-386
run: GOOS=windows GOARCH=386 go build -v -o dht-dce-windows-386.exe .

- name: Build windows-amd64
run: GOOS=windows GOARCH=amd64 go build -v -o dht-dce-windows-amd64.exe .

- name: Build linux-386
run: GOOS=linux GOARCH=386 go build -v -o dht-dce-linux-386 .

- name: Build linux-amd64
run: GOOS=linux GOARCH=amd64 go build -v -o dht-dce-linux-amd64 .

- name: Upload the artifact
uses: actions/upload-artifact@v3
with:
name: dht-dce
path: |
dht-dce-windows-386.exe
dht-dce-windows-amd64.exe
dht-dce-linux-386
dht-dce-linux-amd64
upload:
name: Upload release
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'

steps:
- name: Delete old release and tag
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: latest_auto
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Get artifacts
uses: actions/download-artifact@v3
with:
path: build

- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
name: Latest Autobuild
tag: latest_auto
commit: main
body: ${{ github.event.head_commit.message }}
artifacts: "build/dht-dce/dht-dce-windows-386.exe, build/dht-dce/dht-dce-windows-amd64.exe, build/dht-dce/dht-dce-linux-386, build/dht-dce/dht-dce-linux-amd64"
prerelease: true
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dht-dce
![Build and release](https://github.com/hexahigh/dht-dce/actions/workflows/build&release.yml/badge.svg)<br>
A simple program that converts Discord History Tracker exports to Discord chat exporter's json format.

## Download
You can download the latest version [here](https://github.com/hexahigh/dht-to-dce/releases/tag/latest_auto)

## Usage
<pre>
-channel string
channel ID
-in string
path to the input SQLite database (default "input.db")
-out string
path to the output JSON file (default "output.json")
-v prints the version
</pre>

## Current limitations
<pre>
Can only export one channel at a time.
Does not support profile pictures or files.
</pre>

0 comments on commit 496e3ef

Please sign in to comment.