File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed
Expand file tree Collapse file tree 1 file changed +33
-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 -m pip install -r requirements.txt
14+ python setup.py build && python setup.py install
15+
16+ ```
17+
18+ ** or**
19+
20+ ``` bash
21+ pip install .
22+
23+ ```
424
525## Usage
626
7- Copy pyslackrc.sample to ` $HOME/.pyslackrc ` . And run the program.
27+ * Send a text message.
28+
29+ ``` bash
30+ pyslack text --channel # random --text "This is a test message."
31+ ```
32+
33+ * Upload a file.
34+
35+ ``` bash
36+ pyslack file --channel # random --file /path/to/file --title FileTitle --filetype <file type> \
37+ --initial-comment " This is the comment"
38+ ```
You can’t perform that action at this time.
0 commit comments