Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukekarrys/mlb-slack-status
Update your Slack status with a baseball score.
https://github.com/lukekarrys/mlb-slack-status
mlb slack
Last synced: 16 days ago
JSON representation
Update your Slack status with a baseball score.
- Host: GitHub
- URL: https://github.com/lukekarrys/mlb-slack-status
- Owner: lukekarrys
- License: mit
- Created: 2017-04-15T05:23:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-14T01:03:23.000Z (over 3 years ago)
- Last Synced: 2024-10-20T14:33:21.940Z (17 days ago)
- Topics: mlb, slack
- Language: JavaScript
- Size: 114 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mlb-slack-status
Sync you Slack status with an MLB team.
[![Build Status](https://travis-ci.org/lukekarrys/mlb-slack-status.png?branch=master)](https://travis-ci.org/lukekarrys/mlb-slack-status)
[![Greenkeeper badge](https://badges.greenkeeper.io/lukekarrys/mlb-slack-status.svg)](https://greenkeeper.io/)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)![go cubs](./screenshot.png)
## Usage
```sh
git clone [email protected]:lukekarrys/mlb-slack-status.git
cd mlb-slack-status
npm install
cp .env.example .env
```1. Acquire a Slack token. You could setup a [Slack app](https://api.slack.com/docs/oauth) with a [`users.profile:write` scope](https://api.slack.com/methods/users.profile.set) (takes some work) or use a [legacy token](https://api.slack.com/custom-integrations/legacy-tokens) (not so much work)
1. Edit `.env` with your `TOKEN` and other variables (like `TEAM`)
1. __Bonus:__ upload your team's logo as an emoji in Slack and set it as `EMOJI` in `.env`
1. `npm run deploy && npm run clean` (the `clean` part will remove any old deploys)## What it does
You should now have a server that updates your Slack status to your team's current result. That result will be one of the following:
- **Scheduled**: `CHC – 8:05 EDT vs PIT`
If a game is scheduled for that day it will set your status to the time of the game. The server will then sleep until the start of the game before attempting to update your status again.
- **In progress**: `CHC – 1-0 Top 4th 1 out vs PIT`
If a game is in progress it will set your status to the current result of the game. It will check on a [set interval](./.env.example#L4) until the game is complete.
- **Completed**: `CHC – L 1-6 F/11 vs PIT`
Once the game is completed it will set your status the the final result of the game. The server will then sleep until [the next day](./.env.example#L5-L6) before trying to find the next game.
- **Off day**: `CHC – No game today`
If there is no game scheduled, it will set your status as described. The server will then sleep until [the next day](./.env.example#L5-L6) before trying to find the next game.
## LICENSE
MIT