rchat
A simple RocketChat command line client
rchat --to #team "Hello World!"
Usage
rchat comes with a command line interface that allows you to send messages either to groups or direct people:
rchat --to @rita.cantaora "Hi Rita!"
The message can also be piped into the program via stdin:
echo "Hi!" | rchat --to #team
See help for more information:
See rchat --help.
Configuration
rchat needs to know at least the server url and user credentials to use the API. Those parameters can be given via command line option, set using an envvar or by setting them in a config file.
Base configuration options can be taken from the command line. Arguments given in the command line will override any other configuration.
--user TEXT Username in RocketChat
--user-id TEXT User id associated to a Token
--token TEXT Personal Acces Token Name
--password TEXT Password for user in RocketChat
--url TEXT Url to the RocketChat server
They can also be set as a environment variable by prefixing them such as
RCHAT_URL. Arguments set this way will take precedence over the ones in the
config file.
To configure via file, place your parameters in toml format at
~/.config/rchat/config.toml:
[rchat]
user_id = 'a1d3f4dd..'
token = 'fjXkkf..'
url = 'https://rocketchat.myserver.net'
A specific config file can be given by passing the --config option or setting
the RCHAT_CONFIG envvar.
Extra config files can be placed in the conf.d directory and all of them will
be merged together using confight. Last
values found in these files will override the previous ones, so the complete
list of places to be searched, in the order that will be read are:
/etc/rchat/config.toml/etc/rchat/conf.d/*~/.config/rchat/config.toml~/.config/rchat/conf.d
Meaning that the keys in files placed at ~/.config/rchat/conf.d will override
the rest.
Development
From the root of the application directory, create a python environment, install the application in development mode along with its dependencies and run it locally:
virtualenv env
. env/bin/activate
pip install --upgrade pip
pip install -e . -r requirements.txt -r dev-requirements.txt
Tests can be run using tox (recommended):
pip install tox
tox
Or directly by calling py.test:
python -m pytest
TODO
- Send private messages
- Send message from stdin
- Send message from files
- Upload files
- Upload images
- Read messages
- Listen to new messages
- Autocomplete emojis
- Autocomplete users
- Autocomplete channels
- Config file
- Logging and debug
- Debian Packaging
- Bundled Packaging
- Pypi version
- Versioning script
- Improve startup time
- Define groups of users
- Allow to get reactions
- Allow for threads
- Implement (pre|post) message hooks
- Implement (pre|post) reaction hooks
- Autocomplete names
- Autocomplete channels
- Open editor to compose message
- Preview message in markdown viewer
- Autoformat input as verbatim
Release files for rchat 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rchat-0.0.2.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rchat-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.6 kB
Release files / rchat-0.0.2.tar.gz
| Download URL | rchat-0.0.2.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d11b628dd0365b8cd4c86e7fe70f873533d8319af56cbca2bd234523bc95fc94
|
|
BLAKE2b-256 checksum How to use checksums |
a7fa0cc09949617af5eb979ac14ea540359f38dd427b70730aa718405ca93bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.3 Linux/4.4.0-133-generic
|
Release files / rchat-0.0.2-py3-none-any.whl
| Download URL | rchat-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06071656a8bb8e956a27df54e8f5e977528e9b9ff9fa1070fa393a0f6eb60d3d
|
|
BLAKE2b-256 checksum How to use checksums |
f6a05079d687b5427f79ec67e6e5e1d1f47e95fbb877a217ec45c7b9735acefc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.3 Linux/4.4.0-133-generic
|