Tool to send messages via Slack
Project description
ppslack
Tool to send messages via Slack
PyPI package: ppslack
If you spot any problems or have any improvement ideas then feel free to open an issue. I will be glad to look into it for you.
Installation
The tool is available in PyPI and can be installed using pip:
$ pip install --user ppslack
$ ppslack --help
Once installed, a command line tool ppslack
should be available in your
system's PATH.
Configuration
By default, the tool reads its configuration from ~/.config/ppslack
file (the
location can be overridden by setting environment variable XDG_CONFIG_HOME
).
The config file should look like this:
[default]
slack_key=xxx
email_domain=example.com
Usage - Help
$ ppslack --help
usage: ppslack [--version] [--help] [--debug] [--verbose] [-f SENDER] -t RECIPIENTS [RECIPIENTS ...] [-s SUBJECT] [-S] [-H]
Tool to send messages via Slack
optional arguments:
--version show program's version number and exit
--help show this help message and exit
--debug debugging mode
--verbose verbose debugging mode
-f SENDER, --from SENDER
sender
-t RECIPIENTS [RECIPIENTS ...], --to RECIPIENTS [RECIPIENTS ...]
recipient
-s SUBJECT, --subject SUBJECT
subject
-S, --slack Slack message (keeping for backward compatibility)
-H, --code send code block
Usage - CLI
$ echo 'The king is dead, long live the king!' \
| ppslack -Hf 'Jon Snow' \
-t 'arya.stark@winterfell.com' \
-s 'Re: secret message'
Usage - Python module
from ppslack import Slack
slack = Slack()
status = slack.send(
sender='Jon Snow',
recipients=['arya.stark@winterfell.com'],
subject='Re: secret message',
message='The king is dead, long live the king!',
code=True
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ppslack-3.1.0.tar.gz
(16.2 kB
view hashes)
Built Distribution
Close
Hashes for ppslack-3.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05deba3749764e1ef0afaf94e732c6823477a6cb19ae9160c102e1350ae76b8e |
|
MD5 | c95643e3435519de584fd33c14217fc1 |
|
BLAKE2b-256 | ee0b026e7cb5c24b8386f10b6a1ab65f268cc21854b9d210cdc5d5fde4b6e34d |