Git Product home page Git Product logo

anechka's Introduction

Anechka

Build Coverage Status dependencies Status devDependencies Status Known Vulnerabilities

Anechka is a bot which looks up google spreadsheets, finds someone who is on duty today and sets channel topic with his nick. You can have several timetables for different groups and channels.

Requirements

  • slack bot credentials
  • google api credentials
  • spreadsheet in definite format (see below)

Config

  • credentials.json - credentials from google
  • token.json - token from google which you get after auth
  • runtime.json - config which overrides default.json.

Please copy it from default.json. It looks like this:

{
  "tasks": [
    {
      "spreadsheetId": "qwoeifh;wiorhfilrhgilrh",
      "prefix": "_dev",
      "updateTime": "17:54:30",
      "devIndex": 1,
      "conversation": "GAC9TQ04W",
      "name": "dev update"
    },
    {
      "spreadsheetId": "234trw34te4srgt",
      "prefix": "_ops",
      "updateTime": "17:54:30",
      "devIndex": 0,
      "conversation": "1CDATR2CX",
      "name": "ops update"
    }
  ],
  "token": "zzz",
  "updateInterval": 10,
  "admin": "ivan.petrov"
}

admin is slack login of user which is used to send all kind of error reports.

Slack data is updated every hour, and timetable data is updated every 30 minutes. It is hardcoded for now.

Spreadsheet format

Timetable

Spreadsheet should have a sheet which is called timetable_${prefix}${year}. There you have timetable itself, in format like:

A B C D
6 June 7 July
1 devName1 4 devName3
2 devName2 5 devName4

Please note that month number is required but month title is not neccessary.

Months and particular dates (for example holidays) can be skipped - then bot just does nothing.

Users

Also spreadsheet should have a sheet "users" which links names from timetable to slack names, it looks like this:

A B C
devName1 dev1SlackLogin owner
devName2 dev2SlackLogin

Value owner is third column is used to send error reports for this timetable's owner.

FAQ

  • current directory is used to store cache contents - it is useful for debug.

anechka's People

Contributors

dependabot[bot] avatar jehy avatar snyk-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.