list fully supported and autopep8
[rainbowstream.git] / docs / index.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
14\r
15Install\r
16-------\r
17\r
18The quick way\r
19^^^^^^^^^^^^^\r
20\r
21You will need Python and pip (2.7.x or 3.x).\r
22\r
23.. code:: bash\r
24\r
25 sudo pip install rainbowstream\r
26 # Python 3 users: sudo pip3 install rainbowstream\r
27\r
28The recommended way\r
29^^^^^^^^^^^^^^^^^^^\r
30\r
31Use `virtualenv`_\r
32\r
33.. code:: bash\r
34\r
35 virtualenv venv\r
36 # Python 3 users : use -p to specify your Python 3 localtion as below\r
37 # virtualenv -p /usr/bin/python3 venv\r
38 source venv/bin/activate\r
39 pip install rainbowstream\r
40\r
41\r
42Usage\r
43-----\r
44\r
45The stream\r
46^^^^^^^^^^\r
47\r
48Just type\r
49\r
50.. code:: bash\r
51\r
52 rainbowstream\r
53\r
54and see your stream.\r
55\r
56I shipped a feature which can display **tweet's images directly on terminal**.\r
57You can try it with:\r
58\r
59.. code:: bash\r
60\r
61 rainbowstream -iot # Or rainbowstream --image-on-term\r
62\r
63In the first time you will be asked for authorization of Rainbow Stream\r
64app at Twitter. Just click the “Authorize access” button and paste PIN\r
65number to the terminal, the rainbow will start.\r
66\r
67The interactive mode\r
68^^^^^^^^^^^^^^^^^^^^\r
69\r
70While your personal stream is continued, you are also ready to tweet,\r
71search, reply, retweet… directly from console. Simply type “h” and hit\r
72the Enter key to see the help.\r
73\r
74Input is in interactive mode. It means that you can use arrow key to\r
75move up and down history, tab-autocomplete or 2 tab to view available\r
76suggestion. Input history from previous run is available as well.\r
77\r
78Here is full list of supported command:\r
79\r
80**Explore Commands**\r
81\r
82- ``trend`` will show global trending topics. ``trend US`` will show\r
83 trends in United States while ``trend JP Tokyo`` will show trends in\r
84 Tokyo/Japan.\r
85\r
86- ``home`` will show your timeline. ``home 10`` will print exactly 10\r
87 tweets.\r
88\r
89- ``mentions`` will show mentions timeline. ``mentions 7`` will show 7\r
90 mention tweets.\r
91\r
92- ``whois @dtvd88`` will show profile of @dtvd88.\r
93\r
94- ``view @mdo`` will show @mdo ’s timeline. ``view @dmo 9`` will print\r
95 exactly 9 tweets.\r
96\r
97- ``s #noah`` will search the word *‘noah’*. Result will come back with\r
98 highlight.\r
99\r
100**Tweet Commands**\r
101\r
102- ``t the rainbow is god's promise to noah`` will tweet exactly *‘the\r
103 rainbow is god’s promise to noah’*.\r
104\r
105- ``rt 12`` will retweet the tweet with *[id=12]*. You can see id of\r
106 each tweet beside the time.\r
107\r
108- ``quote 12`` will quote the tweet with *[id=12]*. If no extra text is added,\r
109 the quote will be cancelled.\r
110\r
111- ``allrt 12 20`` will list 20 newest retweets of the tweet with *[id=12]*. If the number of retweets is not specified, 5 newest retweets will be listed instead.\r
112\r
113- ``rep 12 Really`` will reply *‘Really’* to the tweet with *[id=12]*.\r
114\r
115- ``fav 12`` will favorite the tweet with *[id=12]*.\r
116\r
117- ``ufav 12`` will unfavorite tweet with *[id=12]*.\r
118\r
119- ``del 12`` will delete tweet with *[id=12]*.\r
120\r
121- ``show image 12`` will show the image in tweet with *[id=12]* in your\r
122 OS’s image viewer.\r
123\r
124- ``open 12`` will open url in tweet with *[id=12]* in your\r
125 OS’s default browser.\r
126\r
127**Direct Messages Commands**\r
128\r
129- ``inbox`` will show inbox messages. ``inbox 7`` will show newest 7\r
130 messages.\r
131\r
132- ``sent`` will show sent messages. ``sent 7`` will show newest 7\r
133 messages.\r
134\r
135- ``mes @dtvd88 hi`` will send a ``hi`` message to @dtvd88.\r
136\r
137- ``trash 5`` will remove message with *[message\_id=5]*\r
138\r
139**Friends and followers Commands**\r
140\r
141- ``ls fl`` will list all your followers (people who are following\r
142 you).\r
143\r
144- ``ls fr`` will list all your friends (people who you are following).\r
145\r
146- ``fl @dtvd88`` will follow @dtvd88.\r
147\r
148- ``ufl @dtvd88`` will unfollow @dtvd88.\r
149\r
150- ``mute @dtvd88`` will mute @dtvd88.\r
151\r
152- ``unmute @dtvd88`` will unmute @dtvd88.\r
153\r
154- ``muting`` will list muting users.\r
155\r
156- ``block @dtvd88`` will block @dtvd88.\r
157\r
158- ``unblock @dtvd88`` will unblock @dtvd88.\r
159\r
160- ``report @dtvd88`` will report @dtvd88 as a spam account.\r
161\r
162**Switching Stream Commands**\r
163\r
164- ``switch public #AKB48`` will switch current stream to public stream\r
165 and track keyword ``AKB48``\r
166\r
167- ``switch public #AKB48 -f`` will do exactly as above but will ask you\r
168 to provide 2 list:\r
169\r
170 ``Only nicks`` decide what nicks will be include only.\r
171\r
172 ``Ignore nicks``\ decide what nicks will be exclude.\r
173\r
174- ``switch public #AKB48 -d`` will apply filter to *ONLY\_LIST* and\r
175 *IGNORE\_LIST*. You can setup 2 list above at ``config.py``\r
176\r
177- ``switch mine`` will switch current stream to personal stream. ``-f``\r
178 and ``-d`` will work as well.\r
179\r
180**Smart shell**\r
181\r
182- Put anything to terminal, the app will try to eval and display result as a python interactive shell.\r
183\r
184 + ``142857*2`` or ``101**3`` like a calculator.\r
185 + Even ``cal`` will show the calendar for current month.\r
186 + Put ``order_rainbow('anything')`` or ``random_rainbow('wahahaha')`` will make more fun :)\r
187\r
188**Screening Commands**\r
189\r
190- ``theme`` will list available themes.\r
191\r
192 + ``theme monokai`` will apply *monokai* theme immedaitely.\r
193 + ``theme current_as_default`` will remember current theme as next time default.\r
194\r
195- ``h`` will show the help.\r
196\r
197- ``c`` will clear the screen.\r
198\r
199- ``q`` will quit.\r
200\r
201Available commands are listed in `Read The Docs`_.\r
202\r
203Theme customization\r
204^^^^^^^^^^^^^^^^^^^\r
205\r
206Rainbow Stream is shipped with some default themes.\r
207You can either change theme by ``theme`` command or create your favorite one.\r
208\r
209Theme’s screenshot:\r
210\r
211- Monokai\r
212\r
213.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Monokai.png\r
214 :alt: monokai\r
215\r
216- Solarized\r
217\r
218.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Solarized.png\r
219 :alt: solarized\r
220\r
221- Tomorrow Night\r
222\r
223.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/TomorrowNight.png\r
224 :alt: tomorrownight\r
225\r
226- Larapaste\r
227\r
228.. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/larapaste.png\r
229 :alt: larapaste\r
230\r
231For detaile information, see `theme usage and customization`_.\r
232\r
233Development\r
234-----------\r
235\r
236If you want to build a runnable version yourself, follow these simple\r
237steps\r
238\r
239- `Create your own Twitter Application`_\r
240- Get your Twitter application’s API key and secret\r
241- Fork github's repo\r
242- Create a file ``consumer.py`` in ```rainbowstream```_ folder with\r
243 following content\r
244\r
245 .. code:: python\r
246\r
247 # Consumer information\r
248 CONSUMER_KEY = 'APIKey' # Your Twitter application's API key\r
249 CONSUMER_SECRET = 'APISecret' # Your Twitter application's API secret\r
250\r
251- Use pip to install in local\r
252\r
253 .. code:: bash\r
254\r
255 # cd to directory which contains setup.py\r
256 virtualenv venv # Python3 users: use -p to specify python3\r
257 source venv/bin/activate\r
258 pip install -e .\r
259 pip list | grep rainbowstream # confirm installed version\r
260 rainbowstream # local version of rainbowstream\r
261\r
262.. _Create your own Twitter Application: https://apps.twitter.com/app/new\r
263.. _``rainbowstream``: https://github.com/DTVD/rainbowstream/tree/master/rainbowstream\r
264.. _Python Twitter Tool: http://mike.verdone.ca/twitter/\r
265.. _Twitter API: https://dev.twitter.com/docs/api/1.1\r
266.. _theme usage and customization: https://github.com/DTVD/rainbowstream/blob/master/theme.md\r
267.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/\r