Giter VIP home page Giter VIP logo

marvin's Introduction

Marvin

Slackbot to measure "werkgeluk".

Marvin shaking head

"Here I am, brain the size of a planet, and they tell me to take you up to the bridge. Call that job satisfaction? 'Cos I don't."

Setup

  • Clone repo

  • composer install/update

  • Setup DB (you could use db_structure.sql to simplify this for yourself)

  • Create Slack App and get App ID

  • Activate incoming webhooks

  • Create dialog with Block Kit Builder and dump in dialog.json

  • Set scope with OAuth & Permissions

    • channels:read
    • chat:write
    • groups:read
    • im:history
    • im:read
    • incoming-webhook
    • mpim:read
    • users:read
    • users:read:email
  • Setup interactive components

  • Rename .env.example to .env and fill with your settings. You can use several template-vars to make responses pretty:

    • {TODAY} - Dinsdag 1 oktober 2019 - (date)
    • {NOW} - 3 (personal score today)
    • {USER_AVG} - 3.2 (personal average score)
    • {USER_COUNT} - 12 (count of personal scores)
    • {DAILY_AVG} - 3 (score average today of organisation)
    • {DAILY_COUNT} - 12 (count of organisation scores today)
    • {TOTAL_AVG} - 3 (score average total of organisation)
    • {TOTAL_COUNT} - 12 (count of organisation scores total)
  • Setup random trigger to cron.php with cron (you could use crontab.sh to simplify this for yourself)

Functions

  • Ask at random moment every workday for job satisfaction.
  • Ask for "work emotions"
  • Receive messages and pipe those to a mailbox

I can haz demo?

https://youtu.be/Je0Pg8ITvu8

Todo:

  • Send dialog.json to Slack.
  • Use Guzzle to send POST request
  • Catch callback from buttons - https://api.slack.com/messaging/interactivity <<<<<<< HEAD
  • Use Medoo https://medoo.in/api/new to write catches to db (stamped!)
  • Alles nog aan elkaar beunen en voorzien van wat leuke grapjes enzo.
  • Dotenv implementeren
  • Add results to hook
  • Stage 0.1
  • SLACK_EXPIREDTXT implementeren
  • chat.update ipv ephemeral doen
  • Hook nog weer aanpassen
  • Add random trigger example
  • Scriptje maken om die db structuur klaar te rossen voor launch
  • Remove stuff about channels from README.md
  • Say something about scope in Slack
  • Release v0.2
  • Add option for tags
    • Load tags.json
    • die tags.json maken met de db, dan kan je dat leidend houden
    • Make trigger connected to prev results
    • index.php verder splitten zodat emotions en decline eigen states hebben voor afvangen
    • Meta table maken voor tags
    • Emotions opslaan
    • db_structure.sql aanpassen
    • .env.example aanpassen
  • Release v0.3
  • Capture text input
  • Meta table maken voor users

Why is it called Marvin?

Because HHGTTG

Why is the scale 1-11?

Because This is Spinal Tap

Someday:

  • Draw results on grafana dashboard.

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.