Wednesday, 15 November 2017

Slack command line stream

I thought a Slack console might be useful, a very simple client I could display on an always on screen, so I did some experimenting with the Slack Developer Kit for Python and made a super simple command line program which streams messages.

It is most definitely a starting point rather than a finished solution, but someone might find it useful.


Setup (assuming you are using a Raspberry Pi / Linux computer, although it will work on Windows as well).

1. Generate a security token for the slack group you want to stream.

2. Create an environment variable SLACK_API_TOKEN and put your security token in it.

Edit /etc/profile adding the export to the bottom:
sudo nano /etc/profile
export SLACK_API_TOKEN=[my super long token]
3. Install slackclient and colorama using pip:
sudo pip3 install colorama
sudo pip3 install slackclient
4. Download the slack_stream.py from gist:
wget https://gist.githubusercontent.com/martinohanlon/477b6ea4c3bdc679ddff92dfc3bff4a7/raw/8ec39d08a9501b25d381ac3b008e9cf7be92377a/slack_streamer.py
5. Run it:
python3 slack_streamer.py

9 comments:

  1. GNU Screen session number 10 ! Thanks, Martin.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. A high-standard post with all imperative information about Assignment Help UK services. Looking forward to avail the premium services.

    ReplyDelete
  4. Extremely informative blog. Thanks for your efforts in this blog. Visit for
    Web Development Company

    ReplyDelete
  5. This post is not just informative but impressive also. The post is so convincing that it created an urge to choose Assignment Help services. You can email us at Info@Myassignmenthelpau.Com or Phone Number: +61-2-8005-8227

    ReplyDelete
  6. Thank you for posting such a great blog! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work. Thank you for this wonderful Blog!
    Visit: Homework Help

    ReplyDelete
  7. Thank you very much for providing the important information for me. I am working as an academic consultant in UK and offer Excellent Dissertation Help Services to college students.

    ReplyDelete
  8. Very informative post. As a writer of essays I look for many information on various topic. I am representative this Academic writing app

    ReplyDelete

  9. Students are not capable to do their Dissertation Proofreading effectively therefore they ask for professional help. The dissertation helpers at StudentsAssignmentHelp.com work hard to fulfill all your requirements and make sure all your work is completed well.



    ReplyDelete