Skip to content

Commit

Permalink
0.2.0 rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Noskcaj19 committed Jul 29, 2019
1 parent 1b4e245 commit 01be069
Show file tree
Hide file tree
Showing 27 changed files with 1,357 additions and 2,077 deletions.
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

133 changes: 80 additions & 53 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 9 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
[package]
name = "weecord"
version = "0.1.0"
authors = ["Porter Smith <[email protected]>", "khyperia <[email protected]>", "Noskcaj <[email protected]>"]
build = "build.rs"
name = "weechat-discord"
version = "0.2.0"
authors = ["Noskcaj <[email protected]>"]
edition = "2018"

[build-dependencies]
pkg-config = "0.3.14"
cc = "1.0.32"

[lib]
name = "weecord"
name = "weechat_discord"
crate-type = ["dylib"]

[dependencies]
libc = "0.2.51"
libc = "0.2.60"
parking_lot = "0.9.0"
lazy_static = "1.3.0"
dirs = "2.0.1"
crossbeam-channel = "0.3.8"
serde_json = "1.0.39"
parking_lot = "0.9.0"
threadpool = "1.7.1"
crossbeam-channel = "0.3.9"
json = "0.11.14"

[dependencies.serenity]
git = "https://github.com/terminal-discord/serenity"
Expand All @@ -42,3 +36,4 @@ path = "parsing"
[dependencies.weechat]
# path = "../rust-weechat/weechat-rs"
git = "https://github.com/terminal-discord/rust-weechat"

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Ashley Hauck and Jackson Nunley
Copyright (c) 2019 Jackson Nunley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ all_debug: src/*
cargo build

install: all | $(installdir)/plugins
cp target/release/libweecord.* $(installdir)/plugins
cp target/release/libweechat_discord.* $(installdir)/plugins

install_test: all_debug | $(testdir)/plugins
cp target/debug/libweecord.* $(testdir)/plugins
cp target/debug/libweechat_discord.* $(testdir)/plugins

run: install
weechat -a
Expand All @@ -34,4 +34,3 @@ $(testdir)/plugins: | $(testdir)

format:
cargo fmt
clang-format -style="{BasedOnStyle: google, IndentWidth: 4}" -i src/**/*.c
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
Weechat Discord
===============
# Weechat Discord NG

A plugin for Weechat that provides access to Discord.
A plugin that adds Discord to [Weechat](https://weechat.org/)

Ditch the slow Electron client and use your terminal!
(Beta)

(Still in Beta)
---

## A note on using the Discord API (TOS)
### Warning

***Self-bots are against Discord's TOS***
***Usage of self-tokens is a violation of Discord's TOS***

However, this program is not a self bot but simply a client
emulating the functionality of the official client, and does not allow any thing
the official client does not allow (custom embeds) or abuse the api.
This client makes use of the "user api" and is essentially a self-bot.
This client does not abuse the api however it is still a violation of the TOS.

I am not responsible if your account or ip is disabled, restricted, banned or otherwise.
Use at your own risk, using this program could get your account or ip disabled, banned, etc.

---

With that in mind:

### Building

Expand Down
13 changes: 13 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
trigger:
- master

jobs:
- template: ci/azure-build-template.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

- template: ci/azure-build-template.yml
parameters:
name: macOS
vmImage: macOS-10.13
20 changes: 0 additions & 20 deletions build.rs

This file was deleted.

55 changes: 55 additions & 0 deletions ci/azure-build-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- ${{ if eq(parameters.name, 'Linux') }}:
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
rustup update stable
displayName: Install rust
- ${{ if eq(parameters.name, 'macOS') }}:
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
$HOME/.cargo/bin/rustup update stable
displayName: Install rust
- ${{ if eq(parameters.name, 'Linux') }}:
- script: |
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E
sudo add-apt-repository "deb https://weechat.org/ubuntu $(lsb_release -cs) main"
sudo apt update
sudo apt install weechat-dev
displayName: Install weechat
- ${{ if eq(parameters.name, 'macOS') }}:
- script: brew install weechat
displayName: Install weechat

- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
- script: cargo build --release
displayName: Build


- script: cp target/release/libweechat_discord.* $(Build.ArtifactStagingDirectory)/
displayName: Copy artifacts

- ${{ if eq(parameters.name, 'Linux') }}:
# Linux.
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'weechat-discord-linux'
displayName: Publish build artifacts
- ${{ if eq(parameters.name, 'macOS') }}:
# macOS.
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'weechat-discord-macos'
displayName: Publish build artifacts
2 changes: 2 additions & 0 deletions parsing/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/target
**/*.rs.bk

Cargo.lock
6 changes: 6 additions & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {
std::process::Command::new("make")
.arg("test")
.status()
.unwrap();
}
Loading

0 comments on commit 01be069

Please sign in to comment.