From bc31828a96963907829a6dd1ea723a3ba8e610fb Mon Sep 17 00:00:00 2001 From: ayn2op Date: Mon, 9 Jan 2023 16:07:16 +0530 Subject: [PATCH] polish --- .github/workflows/ci.yml | 27 +++++++++++++++ .gitignore | 4 +++ LICENSE | 21 +++++++++++ README.md | 75 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bdc55d6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci +on: [push, pull_request] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: '^1.19' + + - name: Build + run: go build . + + - uses: actions/upload-artifact@v3 + if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + with: + name: discordo_${{ runner.os }}_${{ runner.arch }} + path: | + discordo + discordo.exe diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca87ce3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +discordo* + +# Visual Studio Code +.vscode/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ae882e2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 ayn2op + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..06b4a0b --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +# Discordo · [![ci](https://github.com/ayn2op/discordo/actions/workflows/ci.yml/badge.svg)](https://github.com/ayn2op/discordo/actions/workflows/ci.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/ayn2op/discordo)](https://goreportcard.com/report/github.com/ayn2op/discordo) [![license](https://img.shields.io/github/license/ayn2op/discordo?logo=github)](https://github.com/ayn2op/discordo/blob/master/LICENSE) + +Discordo is a lightweight, secure, and feature-rich Discord terminal client. Heavily work-in-progress, expect breaking changes. + +![Preview](.github/preview.png) + + +## Table of Contents + +- [Features](#features) +- [Installation](#installation) + - [Prebuilt binaries](#prebuilt-binaries) + - [Package managers](#package-managers) + - [Building from source](#building-from-source) +- [Usage](#usage) + - [Configuration](#configuration) +- [Disclaimer](#disclaimer) + +## Features + +- Lightweight +- Secure +- Configurable +- Cross-platform +- Minimalistic +- Feature-rich + - Mouse & clipboard support + - Partial [Discord-flavored markdown](https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-) + +## Installation + +### Prebuilt binaries + +You can download and install a [prebuilt binary here](https://nightly.link/ayn2op/discordo/workflows/ci/main) for Windows, macOS, or Linux. + +### Package managers + +- [Arch Linux](https://aur.archlinux.org/packages/discordo-git/): `yay -S discordo-git` (thanks to [Alyxia Sother](https://github.com/lexisother) for maintaining the AUR package). +- [FreeBSD](https://www.freshports.org/net-im/discordo): `pkg install discordo` or via the ports system `make -C /usr/ports/net-im/discordo install clean`. + +### Building from source + +```bash +git clone https://github.com/ayn2op/discordo +cd discordo +make build + +# optional +sudo mv ./discordo /usr/local/bin +``` + +### Linux clipboard support + +- `xclip` or `xsel` for X11 (`apt install xclip`) +- `wl-clipboard` for Wayland (`apt install wl-clipboard`) + +## Usage + +1. Run the `discordo` executable with no arguments. + +- If you are logging in using an authentication token, provide the `token` command-line flag to the executable (eg: `--token "OTI2MDU5NTQxNDE2Nzc5ODA2.Yc2KKA.2iZ-5JxgxG-9Ub8GHzBSn-NJjNg"`). The token is stored securely in the default OS-specific keyring. + +2. Enter your email and password and click on the "Login" button to continue. + +- Most of the Discord third-party clients store the token in a configuration file unencrypted. Discordo securely stores the token in the default OS-specific keyring. + +### Configuration + +A default configuration file is created on first start-up at `$HOME/.config/discordo/config.yml` on Unix, `$HOME/Library/Application Support/discordo/config.yml` on Darwin, and `%AppData%/discordo/config.yml` on Windows. + +Similarly, a log file is created on first start-up at `$HOME/.cache/discordo/logs.txt` on Unix, `$HOME/Library/Caches/discordo/logs.txt` on Darwin, and `%LocalAppData%/discordo/logs.txt` on Windows. + +## Disclaimer + +Automated user accounts or "self-bots" are against Discord's Terms of Service. I am not responsible for any loss caused by using "self-bots" or Discordo.