File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed
Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments