Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jibbarth/php-slack-status-updater
Lazy CLI tool to update slack status
https://github.com/jibbarth/php-slack-status-updater
phar php slack slack-api symfony
Last synced: 26 days ago
JSON representation
Lazy CLI tool to update slack status
- Host: GitHub
- URL: https://github.com/jibbarth/php-slack-status-updater
- Owner: Jibbarth
- License: mit
- Created: 2021-05-14T08:39:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-25T16:46:08.000Z (over 3 years ago)
- Last Synced: 2024-10-13T14:48:03.172Z (26 days ago)
- Topics: phar, php, slack, slack-api, symfony
- Language: PHP
- Homepage:
- Size: 1.77 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :technologist: Slack Status Updater
It's boring to manually click on slack, find how update emoji on status, or even add a custom message.
As you are lazy, you want a command line tool that can do this for you.
That's why I created this tool:
![Demo](https://user-images.githubusercontent.com/3168281/119533907-9e0f4400-bd86-11eb-9f81-59a5422bf486.gif)
Let's install it and explore how use it...
### Installation
Make sure you have PHP (>=8.0) and Composer installed. Then
```bash
composer global require barth/php-slack-status-updater
```> You have to export in your path the global composer binary path
Or you can find the latest phar in the [release tab](https://github.com/Jibbarth/php-slack-status-updater/releases)
### Configuration
You have to create an app on slack with following scopes:
* `users:write`
* `users.profile:write`Then, install it into your slack workspace, and retrieve a token for your user.
Save your token by launching the following command:
```bash
slack-status-updater auth
```### How To Use
To manually change your status message or emoji, launch:
```bash
slack-status-updater update-status --message="Hello teams" --emoji=wave
```
> Note that message and emoji option are optionnal.There is two dedicated script for the wakeup and shutdown.
```bash
# Mark you as active on slack
slack-status-updater wakeup [--message="Hello teams" --emoji=wave]# Mark you as absent on slack
slack-status-updater shutdown [--message="See you later" --emoji=zzz]
```### Auto scripts
If you are really lazy, you can configure startup script and shutdown script to handle this for you.
Launch the following command:
```bash
slack-status-updater generate-script
```
And answer to the questions. If you leave blank for emoji, the script will use a random emoji :sparkles:> :warning: Currently, script generation only work for Linux. It register an autostart application in `~/.config/autostart/`.
> Need [freedesktop](https://specifications.freedesktop.org/desktop-entry-spec/latest/)### Contribute ?
You know how to generate auto script on windows on MacOs ?
You want improve the commands output ?
Add an awesome feature ?You are more than welcome :hugs: