Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anandchowdhary/rescuetime-slack
⏰ Share your daily productivity score from RescueTime on Slack
https://github.com/anandchowdhary/rescuetime-slack
github-actions rescue-time rescuetime slack slack-bot
Last synced: 20 days ago
JSON representation
⏰ Share your daily productivity score from RescueTime on Slack
- Host: GitHub
- URL: https://github.com/anandchowdhary/rescuetime-slack
- Owner: AnandChowdhary
- License: mit
- Created: 2020-06-26T08:15:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T23:54:59.000Z (10 months ago)
- Last Synced: 2024-12-20T12:13:24.154Z (20 days ago)
- Topics: github-actions, rescue-time, rescuetime, slack, slack-bot
- Language: TypeScript
- Homepage: https://anandchowdhary.github.io/rescuetime-slack/
- Size: 179 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⏰ RescueTime Slack
Post your RescueTime daily productivity pulse and hours logged to Slack.
[![Deno CI](https://github.com/AnandChowdhary/rescuetime-slack/workflows/RescueTime%20Slack/badge.svg)](https://github.com/AnandChowdhary/rescuetime-slack/actions)
[![GitHub](https://img.shields.io/github/license/AnandChowdhary/rescuetime-slack)](https://github.com/AnandChowdhary/rescuetime-slack/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/AnandChowdhary/rescuetime-slack)](https://github.com/AnandChowdhary/rescuetime-slack/graphs/contributors)
[![RescueTime Slack](https://img.shields.io/badge/deno-starter-brightgreen)](https://denorg.github.io/starter/)
[![TypeScript](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/AnandChowdhary/rescuetime-slack)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)![Screenshot of bot message](./assets/screenshot-2.png)
## ⭐ Getting started
The code in [`index.ts`](./index.ts) fetches your RescueTime daily statistics and posts it on Slack using a webhook configured in [`rescuetime-slack.yml`](./rescuetime-slack.yml):
```yml
webhook: https://hooks.slack.com/services/$WEBHOOK
apiKeys:
"U013KLNLY86": "$API_KEY"
```More people can be added under the `apiKeys` key in the YAML file by adding their Slack user IDs. For each user, `$API_KEY` is replaced by the API key for their name, stored in GitHub Secrets; for example "U013KLNLY86" transforms to `API_KEY_U013KLNLY86` (the name of the environment variable). The `$WEBHOOK` environment variable has the Slack webhook.
To get started, fork this project and update the YAML configuration and GitHub Secrets to get your own bot. You can also customize the bot name and icon in the configuration file (`botName` and `botIcon` respectively).
The bot also adds a "RescueScore" which is the productivity score * number of minutes, and gives a great overview of the total productivity.
## 👩💻 Automation
A GitHub Actions [workflow](./.github/workflows/deno.yml) runs the following script every day at 8 am UTC to post the message:
```bash
deno run --unstable --allow-net --allow-read --allow-env mod.ts
```## 📄 License
[MIT](./LICENSE) © [Anand Chowdhary](https://anandchowdhary.com)