Merge pull request #73 from polarkac/custom_prefix
[rainbowstream.git] / README.rst
... / ...
CommitLineData
1Rainbow Stream\r
2--------------\r
3\r
4.. image:: http://img.shields.io/pypi/dm/rainbowstream.svg?style=flat\r
5 :target: https://pypi.python.org/pypi/rainbowstream\r
6\r
7.. image:: http://img.shields.io/pypi/v/rainbowstream.svg?style=flat\r
8 :target: https://pypi.python.org/pypi/rainbowstream\r
9\r
10Terminal-based Twitter Client. Realtime tweetstream, compose, search ,\r
11favorite … and much more fun directly from terminal.\r
12\r
13This package is built on the top of `Python Twitter Tool`_ and `Twitter API`_,\r
14can run on Python 2.7.x and 3.x .\r
15\r
16Home page : http://www.rainbowstream.org/\r
17\r
18Source code : https://github.com/DTVD/rainbowstream\r
19\r
20Showcase\r
21--------\r
22\r
23.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/rs.gif\r
24 :alt: gif\r
25\r
26Install\r
27-------\r
28\r
29The quick way\r
30^^^^^^^^^^^^^\r
31\r
32You will need Python and pip (2.7.x or 3.x).\r
33\r
34.. code:: bash\r
35\r
36 sudo pip install rainbowstream\r
37 # Python 3 users: sudo pip3 install rainbowstream\r
38\r
39\r
40The recommended way\r
41^^^^^^^^^^^^^^^^^^^\r
42\r
43Use `virtualenv`_\r
44\r
45.. code:: bash\r
46\r
47 virtualenv venv\r
48 # Python 3 users : use -p to specify your Python 3 localtion as below\r
49 # virtualenv -p /usr/bin/python3 venv\r
50 source venv/bin/activate\r
51 pip install rainbowstream\r
52\r
53Troubleshooting\r
54^^^^^^^^^^^^^^^\r
55\r
56If you use Linux, you might need to install some packages if you haven't already.\r
57For debian-based distros, these can be installed with\r
58\r
59.. code:: bash\r
60\r
61 sudo apt-get install python-dev libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev\r
62\r
63Besides, Mac OSX Maverick with Xcode 5.1 has a well-known `clang unknown argument`_ problem with\r
64the ``Pillow`` package installation - a dependency of this app.\r
65If you are in this case, I recommend taking a look at `Issue #10`_ and let me know if this workaround doesn't work for you.\r
66\r
67.. code:: bash\r
68\r
69 export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future\r
70\r
71If installation in *the quick way* doesn't work:\r
72\r
73- ``sudo pip uninstall rainbowstream``\r
74- use the *virtualenv way* above\r
75- `create an issue`_ and provide:\r
76\r
77 + Your OS\r
78 + Your Python version\r
79\r
80Usage\r
81-----\r
82\r
83The stream\r
84^^^^^^^^^^\r
85\r
86Just type\r
87\r
88.. code:: bash\r
89\r
90 rainbowstream\r
91\r
92and see your stream.\r
93\r
94I shipped a feature which can display **tweet's images directly on terminal**.\r
95You can try it with:\r
96\r
97.. code:: bash\r
98\r
99 rainbowstream -iot # Or rainbowstream --image-on-term\r
100\r
101You also can change the config key ``IMAGE_ON_TERM`` to ``True`` inside the app\r
102to enable above feature,\r
103change ``IMAGE_SHIFT`` to set image's margin (relative to your terminal's width)\r
104or ``IMAGE_MAX_HEIGHT`` to control max height of every image.\r
105(see `config management`_ section).\r
106\r
107In the first time you will be asked for authorization of Rainbow Stream\r
108app at Twitter. Just click the “Authorize access” button and paste PIN\r
109number to the terminal, the rainbow will start.\r
110\r
111You might want to use rainbowstream via an **HTTP/SOCKS proxy**. Proxy settings are\r
112provided as follows:\r
113\r
114.. code:: bash\r
115\r
116 rainbowstream --proxy-host localhost --proxy-port 1337 --proxy-type HTTP\r
117 # or using the short form:\r
118 rainbowstream -ph localhost -pp 1337 -pt HTTP\r
119\r
120Both ``--proxy-port`` and ``--proxy-type`` can be omitted. In this case default\r
121proxy port ``8080`` and default proxy type ``SOCKS5`` are used.\r
122\r
123The interactive mode\r
124^^^^^^^^^^^^^^^^^^^^\r
125\r
126While your personal stream is continued, you are also ready to tweet,\r
127search, reply, retweet… directly from console. Simply type “h” and hit\r
128the Enter key to see the help.\r
129\r
130Input is in interactive mode. It means that you can use arrow key to\r
131move up and down history, tab-autocomplete or 2 tab to view available\r
132suggestion. Input history from previous run is available as well.\r
133\r
134Available commands are listed in `Read The Docs`_.\r
135\r
136Theme customization\r
137^^^^^^^^^^^^^^^^^^^\r
138\r
139Rainbow Stream is shipped with some default themes.\r
140You can either change theme by ``theme`` command or create your favorite one.\r
141\r
142Theme’s screenshot:\r
143\r
144- Monokai\r
145\r
146.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Monokai.png\r
147 :alt: monokai\r
148\r
149- Solarized\r
150\r
151.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Solarized.png\r
152 :alt: solarized\r
153\r
154- Tomorrow Night\r
155\r
156.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/TomorrowNight.png\r
157 :alt: tomorrownight\r
158\r
159- Larapaste\r
160\r
161.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/larapaste.png\r
162 :alt: larapaste\r
163\r
164For detaile information, see `theme usage and customization`_.\r
165\r
166\r
167Bug and feature requests\r
168------------------------\r
169\r
170Found a bug or a feature request ?\r
171Please `create an issue`_ or contact me at `@dtvd88`_\r
172\r
173Development\r
174-----------\r
175\r
176If you want to build a runnable version yourself, follow these simple\r
177steps\r
178\r
179- `Create your own Twitter Application`_\r
180- Get your Twitter application’s API key and secret\r
181- Fork this repo and clone in your system.\r
182- Create a file ``consumer.py`` in `rainbowstream`_ folder with\r
183 following content\r
184\r
185 .. code:: python\r
186\r
187 # Consumer information\r
188 CONSUMER_KEY = 'APIKey' # Your Twitter application's API key\r
189 CONSUMER_SECRET = 'APISecret' # Your Twitter application's API secret\r
190\r
191- Use pip to install in local\r
192\r
193 .. code:: bash\r
194\r
195 # cd to directory which contains setup.py (cloned directory)\r
196 virtualenv venv # Python3 users: use -p to specify python3\r
197 source venv/bin/activate\r
198 pip install -e .\r
199 which rainbowstream # /this-directory/venv/bin/rainbowstream\r
200 # Remove ~/.rainbow_oauth if exists\r
201 rainbowstream # local version of rainbowstream\r
202\r
203\r
204Contributing\r
205------------\r
206I appreciate any help and support. Feel free to `fork`_ and `create a pull request`_.\r
207You will be listed as contributor.\r
208\r
209License\r
210-------\r
211\r
212Rainbow Stream are released under an MIT License. See LICENSE.txt for\r
213details\r
214\r
215\r
216.. _Python Twitter Tool: http://mike.verdone.ca/twitter/\r
217.. _Twitter API: https://dev.twitter.com/docs/api/1.1\r
218.. _create an issue: https://github.com/DTVD/rainbowstream/issues/new\r
219.. _@dtvd88: https://twitter.com/dtvd88\r
220.. _fork: https://github.com/DTVD/rainbowstream/fork\r
221.. _create a pull request: https://github.com/DTVD/rainbowstream/compare/\r
222.. _Read The Docs: http://rainbowstream.readthedocs.org/en/latest/\r
223.. _config guide: https://github.com/DTVD/rainbowstream/blob/master/theme.md\r
224.. _theme usage and customization: https://github.com/DTVD/rainbowstream/blob/master/theme.md\r
225.. _Create your own Twitter Application: https://apps.twitter.com/app/new\r
226.. _rainbowstream: https://github.com/DTVD/rainbowstream/tree/master/rainbowstream\r
227.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/\r
228.. _config management: http://rainbowstream.readthedocs.org/en/latest/#config-explanation\r
229.. _clang unknown argument: http://kaspermunck.github.io/2014/03/fixing-clang-error/\r
230.. _Issue #10: https://github.com/DTVD/rainbowstream/issues/10\r