Metadata-Version: 2.1
Name: ppslack
Version: 1.0.0
Summary: Tool to send messages via Slack
Home-page: https://github.com/peterpakos/ppslack
Author: Peter Pakos
Author-email: peter@pakos.uk
License: GPLv3
Keywords: mail mailer sendgrid slack
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Topic :: Communications :: Chat
Description-Content-Type: text/markdown
Requires-Dist: pplogger
Requires-Dist: ppconfig
Requires-Dist: slackclient (==1.3.1)

# ppslack
Tool to send messages via Slack

PyPI package: [ppslack](https://pypi.python.org/pypi/ppslack)

If you spot any problems or have any improvement ideas then feel free to open
an issue and I will be glad to look into it for you.

## Installation
A recommended way of installing the tool is pip install.

Once installed, a command line tool `ppslack` should be available in your
system's PATH.

### pip install
The tool is available in PyPI and can be installed using pip:
```
$ pip install --user ppslack
$ ppslack --help
```

## 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] [-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
  -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
)
```


