Skip to content

Commit 787021d

Browse files
committed
update README
1 parent 55af928 commit 787021d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
11
# pyslack
22

3-
A python to slack interface. It is using Slack legacy tokens.
3+
A command line python base interface to Slack. It uses Slack New App API verion 2.0.
4+
5+
## Install
6+
7+
Create an App on slack and enable `chat:write`, `im:write` and `files:write` permissions.
8+
Install the app, and save the Bot User Token OAuth Access Token to `$HOME/.pyslackrc` from the template `pyslackrc.sample`.
9+
And install the python package.
10+
11+
12+
``` bash
13+
python setup.py build && python setup.py install
14+
15+
```
16+
17+
**or**
18+
19+
``` bash
20+
pip install .
21+
22+
```
423

524
## Usage
625

7-
Copy pyslackrc.sample to `$HOME/.pyslackrc`. And run the program.
26+
* Send a text message.
27+
28+
``` bash
29+
pyslack text --channel #random --text "This is a test message."
30+
```
31+
32+
* Upload a file.
33+
34+
``` bash
35+
pyslack file --channel #random --file /path/to/file --title FileTitle --filetype <file type> \
36+
--initial-comment "This is the comment"
37+
```

0 commit comments

Comments
 (0)