Commit | Line | Data |
---|---|---|
c264071c | 1 | Rainbow 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 | |
10 | Terminal-based Twitter Client. Realtime tweetstream, compose, search ,\r | |
11 | favorite … and much more fun directly from terminal.\r | |
12 | \r | |
13 | This package is built on the top of `Python Twitter Tool`_ and `Twitter API`_.\r | |
14 | \r | |
c264071c | 15 | Install\r |
16 | -------\r | |
17 | \r | |
0dc0dd00 O |
18 | The quick way\r |
19 | ^^^^^^^^^^^^^\r | |
20 | \r | |
8b076818 | 21 | You will need Python and pip (2.7.x or 3.x).\r |
c264071c | 22 | \r |
23 | .. code:: bash\r | |
24 | \r | |
25 | sudo pip install rainbowstream\r | |
8b076818 | 26 | # Python 3 users: sudo pip3 install rainbowstream\r |
b84845b9 | 27 | \r |
0dc0dd00 O |
28 | The recommended way\r |
29 | ^^^^^^^^^^^^^^^^^^^\r | |
b84845b9 | 30 | \r |
0dc0dd00 | 31 | Use `virtualenv`_\r |
c264071c | 32 | \r |
33 | .. code:: bash\r | |
34 | \r | |
b84845b9 | 35 | virtualenv venv\r |
0dc0dd00 O |
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 | |
c264071c | 39 | pip install rainbowstream\r |
40 | \r | |
0dc0dd00 | 41 | \r |
c264071c | 42 | Usage\r |
43 | -----\r | |
44 | \r | |
45 | The stream\r | |
46 | ^^^^^^^^^^\r | |
47 | \r | |
48 | Just type\r | |
49 | \r | |
50 | .. code:: bash\r | |
51 | \r | |
aa835f48 | 52 | rainbowstream\r |
c264071c | 53 | \r |
54 | and see your stream.\r | |
55 | \r | |
56 | I shipped a feature which can display **tweet's images directly on terminal**.\r | |
57 | You can try it with:\r | |
58 | \r | |
59 | .. code:: bash\r | |
60 | \r | |
aa835f48 | 61 | rainbowstream -iot # Or rainbowstream --image-on-term\r |
c264071c | 62 | \r |
63 | In the first time you will be asked for authorization of Rainbow Stream\r | |
64 | app at Twitter. Just click the “Authorize access” button and paste PIN\r | |
65 | number to the terminal, the rainbow will start.\r | |
66 | \r | |
67 | The interactive mode\r | |
68 | ^^^^^^^^^^^^^^^^^^^^\r | |
69 | \r | |
70 | While your personal stream is continued, you are also ready to tweet,\r | |
71 | search, reply, retweet… directly from console. Simply type “h” and hit\r | |
72 | the Enter key to see the help.\r | |
73 | \r | |
74 | Input is in interactive mode. It means that you can use arrow key to\r | |
75 | move up and down history, tab-autocomplete or 2 tab to view available\r | |
76 | suggestion. Input history from previous run is available as well.\r | |
77 | \r | |
78 | Here 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 | |
162af8aa O |
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 | |
c264071c | 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 | |
162af8aa O |
124 | - ``open 12`` will open url in tweet with *[id=12]* in your\r |
125 | OS’s default browser.\r | |
126 | \r | |
c264071c | 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 | |
bef33491 O |
162 | **Twitter list**\r |
163 | \r | |
164 | - ``list`` will show all lists you are belong to.\r | |
165 | \r | |
166 | - ``list home`` will show timeline of list. You will be asked for list's name.\r | |
167 | \r | |
168 | - ``list all_mem`` will show list's all members.\r | |
169 | \r | |
170 | - ``list all_sub`` will show list's all subscribers.\r | |
171 | \r | |
172 | - ``list add`` will add specific person to a list owned by you.\r | |
173 | You will be asked for list's name and person's name.\r | |
174 | \r | |
175 | - ``list rm`` will remove specific person from a list owned by you.\r | |
176 | You will be asked for list's name and person's name.\r | |
177 | \r | |
178 | - ``list sub`` will subscribe you to a specific list.\r | |
179 | \r | |
180 | - ``list unsub`` will unsubscribe you from a specific list.\r | |
181 | \r | |
182 | - ``list own`` will show all list owned by you.\r | |
183 | \r | |
184 | - ``list new`` will create a new list.\r | |
185 | \r | |
186 | - ``list update`` will update a list owned by you.\r | |
187 | \r | |
188 | - ``list del`` will delete a list owned by you.\r | |
189 | \r | |
c264071c | 190 | **Switching Stream Commands**\r |
191 | \r | |
192 | - ``switch public #AKB48`` will switch current stream to public stream\r | |
193 | and track keyword ``AKB48``\r | |
194 | \r | |
195 | - ``switch public #AKB48 -f`` will do exactly as above but will ask you\r | |
196 | to provide 2 list:\r | |
197 | \r | |
198 | ``Only nicks`` decide what nicks will be include only.\r | |
199 | \r | |
200 | ``Ignore nicks``\ decide what nicks will be exclude.\r | |
201 | \r | |
202 | - ``switch public #AKB48 -d`` will apply filter to *ONLY\_LIST* and\r | |
203 | *IGNORE\_LIST*. You can setup 2 list above at ``config.py``\r | |
204 | \r | |
205 | - ``switch mine`` will switch current stream to personal stream. ``-f``\r | |
206 | and ``-d`` will work as well.\r | |
207 | \r | |
208 | **Smart shell**\r | |
209 | \r | |
210 | - Put anything to terminal, the app will try to eval and display result as a python interactive shell.\r | |
211 | \r | |
212 | + ``142857*2`` or ``101**3`` like a calculator.\r | |
213 | + Even ``cal`` will show the calendar for current month.\r | |
214 | + Put ``order_rainbow('anything')`` or ``random_rainbow('wahahaha')`` will make more fun :)\r | |
215 | \r | |
216 | **Screening Commands**\r | |
217 | \r | |
2d341029 O |
218 | - ``theme`` will list available themes.\r |
219 | \r | |
b6cddcd5 O |
220 | + ``theme monokai`` will apply *monokai* theme immedaitely.\r |
221 | + ``theme current_as_default`` will remember current theme as next time default.\r | |
2d341029 | 222 | \r |
c264071c | 223 | - ``h`` will show the help.\r |
224 | \r | |
225 | - ``c`` will clear the screen.\r | |
226 | \r | |
227 | - ``q`` will quit.\r | |
228 | \r | |
e5057f23 | 229 | Available commands are listed in `Read The Docs`_.\r |
c264071c | 230 | \r |
e5057f23 O |
231 | Theme customization\r |
232 | ^^^^^^^^^^^^^^^^^^^\r | |
233 | \r | |
06302419 | 234 | Rainbow Stream is shipped with some default themes.\r |
e5057f23 O |
235 | You can either change theme by ``theme`` command or create your favorite one.\r |
236 | \r | |
155083ad O |
237 | Theme’s screenshot:\r |
238 | \r | |
3681056d O |
239 | - Monokai\r |
240 | \r | |
155083ad O |
241 | .. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Monokai.png\r |
242 | :alt: monokai\r | |
243 | \r | |
3681056d O |
244 | - Solarized\r |
245 | \r | |
155083ad O |
246 | .. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/Solarized.png\r |
247 | :alt: solarized\r | |
248 | \r | |
3681056d O |
249 | - Tomorrow Night\r |
250 | \r | |
aa835f48 O |
251 | .. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/TomorrowNight.png\r |
252 | :alt: tomorrownight\r | |
253 | \r | |
3681056d O |
254 | - Larapaste\r |
255 | \r | |
aa835f48 O |
256 | .. figure:: https://raw.githubusercontent.com/DTVD/rainbowstream/master/screenshot/themes/larapaste.png\r |
257 | :alt: larapaste\r | |
258 | \r | |
e5057f23 | 259 | For detaile information, see `theme usage and customization`_.\r |
c264071c | 260 | \r |
2d341029 O |
261 | Development\r |
262 | -----------\r | |
263 | \r | |
264 | If you want to build a runnable version yourself, follow these simple\r | |
265 | steps\r | |
266 | \r | |
267 | - `Create your own Twitter Application`_\r | |
268 | - Get your Twitter application’s API key and secret\r | |
269 | - Fork github's repo\r | |
270 | - Create a file ``consumer.py`` in ```rainbowstream```_ folder with\r | |
271 | following content\r | |
272 | \r | |
273 | .. code:: python\r | |
274 | \r | |
275 | # Consumer information\r | |
276 | CONSUMER_KEY = 'APIKey' # Your Twitter application's API key\r | |
277 | CONSUMER_SECRET = 'APISecret' # Your Twitter application's API secret\r | |
278 | \r | |
279 | - Use pip to install in local\r | |
280 | \r | |
281 | .. code:: bash\r | |
282 | \r | |
283 | # cd to directory which contains setup.py\r | |
284 | virtualenv venv # Python3 users: use -p to specify python3\r | |
285 | source venv/bin/activate\r | |
286 | pip install -e .\r | |
287 | pip list | grep rainbowstream # confirm installed version\r | |
288 | rainbowstream # local version of rainbowstream\r | |
c264071c | 289 | \r |
2d341029 O |
290 | .. _Create your own Twitter Application: https://apps.twitter.com/app/new\r |
291 | .. _``rainbowstream``: https://github.com/DTVD/rainbowstream/tree/master/rainbowstream\r | |
c264071c | 292 | .. _Python Twitter Tool: http://mike.verdone.ca/twitter/\r |
293 | .. _Twitter API: https://dev.twitter.com/docs/api/1.1\r | |
e5057f23 | 294 | .. _theme usage and customization: https://github.com/DTVD/rainbowstream/blob/master/theme.md\r |
0dc0dd00 | 295 | .. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/\r |