Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hitode909/body-battery-to-slack-status
Login to Garmin Connect via Puppeteer, Set Body Battery to your Slack Status
https://github.com/hitode909/body-battery-to-slack-status
garmin-connect pupeeter slack
Last synced: 23 days ago
JSON representation
Login to Garmin Connect via Puppeteer, Set Body Battery to your Slack Status
- Host: GitHub
- URL: https://github.com/hitode909/body-battery-to-slack-status
- Owner: hitode909
- Created: 2020-03-07T09:25:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T12:20:22.000Z (11 months ago)
- Last Synced: 2023-12-08T13:28:35.916Z (11 months ago)
- Topics: garmin-connect, pupeeter, slack
- Language: TypeScript
- Homepage:
- Size: 209 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# body-battery-to-slack-status
CLI tool to Share Body Battery in your Slack team.
Knowing teammate's body battery is useful.High body battery member may be able to do a complex work. Low body battery member should rest.
- Login to Garmin Connect via Puppeteer
- Set Body Battery, Stress, Heart Rate to your Slack Status
- Currently this script uses [Legacy tokens](https://api.slack.com/legacy/custom-integrations/legacy-tokens).This screenshot means current condition is 😣, Body Battery is 21, Stress is 31, Heart Beat 70.
![image](https://user-images.githubusercontent.com/18360/76140557-24b30500-609f-11ea-8b0f-c68b0c6cec48.png)
## HOW TO USE
Set environment variable to login, and `npm start` will launch Puppeteer and set your Slack Status every 10 minutes.
```
$ npm ci
$ GARMIN_MAIL_ADDRESS=... GARMIN_PASSWORD=... SLACK_LEGACY_TOKEN=... npm start
```## CUSTOMIZE EMOJI
Default emoji set is 😫😖😣😞😉🙂😅😃😆🤩.
You can set EMOJIS environment variable to customize status emoji set.For example,
```
EMOJIS=':ant: :butterfly: :bee:'
```will make the rule below.
| Body Battery | Emoji |
|--------------|------|
| 0〜33 | 🐜 |
| 34〜66 | 🦋 |
| 67〜100 | 🐝 |## RUN ON CI
Default behavior is daemon mode. To run on CI service(like a GitHub Actions), set `CI=true` to run only once.
```
CI=true npm start
```## TODO
- Implement as Electron App to easily using.