Giter Club home page Giter Club logo

clean-alert's Introduction

clean-alert

Notification of cleaning turn via Slack API.

Requirement

  • Rust (2021 edition)
  • Cargo
  • Openssl
  • Slack app

Related links:

  1. Rust 2021: https://www.digitalocean.com/community/tutorials/install-rust-on-ubuntu-linux
  2. Cargo: https://installati.one/install-cargo-ubuntu-20-04/
  3. Openssl” https://idroot.us/install-openssl-ubuntu-20-04/
  4. Slack app in the client side (to test it works)

How to use

  1. Clone this repository and move.

    $ git clone https://github.com/NAIST-SE/clean-alert.git
    $ cd clean-alert
  2. Update channel_info.json (as an input file, to read members IDs list) and member_log.csv (as an output log file, to write members id who's in charge of that week) files.

channel_info.json - it contains "token" secret key for integrating bots in Slack workspace. Generate new one from "https://api.slack.com/apps?" -> "OAuth&Permissions" -> "OAuth Tokens for Your Workspace". Or ask the Slack workspace owner to provide the "Bot User OAuth Token". It should start with xoxb_. Update "id" with the channel ID you like to interact with bot messages. You can get it by right-click and copy channel link from Slack workspace. The ID is at the end of the channel link. You may change the message, if you like to.

member_log.csv - write a date and two user's IDs from the member's list as a first log. You may copy the previous list or remove all logs and leave it empty. The example of two weeks run looks like this:

```
2022-01-01,U0123456789,U0123456789
2022-01-01,U0123456789,U0123456789
```
  1. Build clean-alert

    $ cargo add openssl-probe
    $ cargo build

    or make build without dynamic links binary to run it elsewhere:

    $ cargo build --release

    You may clean before build, cargo clean After build cargo will generate clean-alert binary file, to be executed.

  2. Run clean-alert

    $ clean-alert

You may use docker to run cargo project: $ docker run --rm -it -v pwd:/home/rust/src ekidd/rust-musl-builder cargo build --release

- After execution, `member_log.csv` is created.
  1. If you want to use weekly , use crontab.

    # Execution every Wednesday at 15:00.
    $ 0 15 * * 3 <path to clean-alert>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.