Introduction
Rainbow Stream allows you to manage just about every aspect of your Twitter account from the command line. Yes, you did read that right. It's a full featured command line Twitter client written in Python. Chances are, you're falling into one of two camps right about now. If you're in the slightly insane one that thinks this is a good idea, stay tuned. Rainbow Stream actually does provide an simple and intuitive Twitter experience from the Linux command line.Prerequisite Packages
You probably have everything that you need to get Rainbow Stream working on your system right now, but just to be sure, there are a few packages that you should install if you haven't already. Debian Distros# apt-get install python-dev libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev virtualenvRedhat Distros
# dnf/yum install python libjpeg freetype freetype1 zlib python-virtualenv
Set Up The Virtualenv
So, you don't exactly need Virtualenv, but Rainbow Stream pulls in a lot of dependencies, and since you're going to need to manage it with Pip, you probably need want to compartmentalize it into its own virtual environment.Figure out where you want your Twitter environment, and create your virtual environment.
$ virtualenv -p python3 twitterNow,
cd
in to your new twitter
folder, and activate the environment. $ cd twitter $ source bin/activateThat's it. You're ready to install.
Install Rainbow Stream
Pip is the best way to manage Rainbow Stream, since it's a Python package that isn't packaged by many, if any, major distributions at the time of this guide. That's alright, though. Installing it with Pip is very easy.pip install rainbowstreamPip will run through a relatively lengthy installation process to pull in Rainbow Stream and all of its dependencies.
Basic Usage
First Run
You will always need to be in your virtual environment with it activated to run Rainbow Stream. Once you're there, you can start it up like any other CLI application.$ rainbowstreamOn your first run, Rainbow Stream is going to ask you to grant it permission to access your Twitter account. It will automatically open up a web browser on your computer to the Twitter page needed to grant external applications permission to access your account. Fill out your Twitter username and password, and confirm Rainbow Stream's access.
After your successful confirmation, the terminal window will display your Twitter handle in ASCII art and log you in.
Setting Your Stream
By default, Rainbow Stream will populate with new tweets from your stream as they arrive. You don't need to do anything extra in order to see incoming tweets, and you don't need to refresh.Rainbow Stream does eventually timeout if you haven't been active for a while. When this happens, you have to reactivate your stream. You can do this by typing in the following.
stream mine
Getting Recent Tweets
If you've just signed on, and you want to see past tweets from when you were away, you can use Rainbow Stream'shome
command to collect a specific number of past tweets. home 10
Opening a Tweet
Rainbow Stream assigns every tweet that comes in an ID. These IDs are unique to the session, but do reset. It doesn't really matter, though. They're just for interacting with tweets as they come in or right after they were pulled. To open up a tweet or the link from it, use the built in command.open id#Just include the number in place of
#id
. Tweeting
Tweeting from Rainbow Stream is very simple. Just add the lettert
before the text you want to tweet out. t Rainbow Stream is awesome! #cliftw