hitode909 / body-battery-to-slack-status

Login to Garmin Connect via Puppeteer, Set Body Battery to your Slack Status

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

This screenshot means current condition is 😣, Body Battery is 21, Stress is 31, Heart Beat 70.

image

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.

About

Login to Garmin Connect via Puppeteer, Set Body Battery to your Slack Status


Languages

Language:TypeScript 99.1%Language:JavaScript 0.9%