Giter Club home page Giter Club logo

canh-sat-cham-cong's Introduction

Cảnh sát chấm công

Environment: python3.5, pip

Tool được phát triển bởi đội devs của EWAY - ứng phó nhanh với việc làm remote trong đại dịch Covid-19.

Mô hình

Slack --> This server --> AirTable

  1. Nhân sự vào group dự án của mình, báo cáo đầu giờ sáng, có [Daily] theo mẫu:
[Daily]
Hôm qua làm gì:
    - uống cafe
    - xem netflix
Hôm nay làm gì:
    - cắt móng tay cho mèo
Khó khăn gặp phải:
    - mạng chậm
  1. Kết quả

Trên AirTable có kết quả như này, có thể group by theo các field khác nhau để ra report khác:

Kết quả

Cách tích hợp:

Tạo AirTable

  1. Đăng ký tài khoản AirTable tại https://airtable.com
  2. Tạo workspace cho team bạn
  3. Vào copy template này: Bấm nút Copy Base https://airtable.com/shrInimCTGmlwoENx
  4. Lấy Base ID và API Key

Deploy

  • Deploy code lên một server bất kỳ (có thể work luôn với Heroku)
  • Edit config:
AIRTABLE_TOKEN=<your_airtable_api_key>
AIRTABLE_BASE=<your_airtable_base_id>
SLACK_BOT_TOKEN=<cái này update sau>
  • Deploy --> Expose URL

Vào Slack tạo bot

Vì Slack chỉ share được bot app khi mà dùng chung server với nhau nên các team khác nhau nên tự tạo bot cho privacy.

  • Vào https://api.slack.com/apps --> Create New App
  • Ở OAuth & Permissions: Phần Scopes --> Bot Token Scopes Thêm quyền như sau:

Image

  • Ở App Home: Điền display name, avatar cho bot của bạn trong phần How Your App Displays
  • Install App --> Copy Bot OAuth Token --> Add vào config SLACK_BOT_TOKEN của server
  • Ở Event Subscriptions --> Enable Events
    • Request URL: http://<your.server.url>/slackbot Image
    • Subscribe to bot events: Image
  • Save Config
  • Re-install your app

Sử dụng

  • Vào channel nào mà team dùng để daily report
  • Add bot vào group
  • Báo cáo hàng ngày với [Daily] ở đầu

Authors:

  1. [email protected]
  2. [email protected]

canh-sat-cham-cong's People

Stargazers

 avatar

Watchers

 avatar

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.