1 |
gregoa |
1473 |
<?xml version='1.0'?> |
2 |
gregoa |
2707 |
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?> |
3 |
gregoa |
1473 |
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
4 |
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
5 |
|
|
|
6 |
|
|
<article> |
7 |
|
|
<section> |
8 |
|
|
<title>bti</title> |
9 |
|
|
<refentry> |
10 |
|
|
<refentryinfo> |
11 |
|
|
<title>bti</title> |
12 |
|
|
<date>May 2008</date> |
13 |
|
|
<productname>bti</productname> |
14 |
|
|
</refentryinfo> |
15 |
|
|
|
16 |
|
|
<refmeta> |
17 |
|
|
<refentrytitle>bti</refentrytitle> |
18 |
|
|
<manvolnum>1</manvolnum> |
19 |
|
|
<refmiscinfo class="version"></refmiscinfo> |
20 |
|
|
</refmeta> |
21 |
|
|
|
22 |
|
|
<refnamediv> |
23 |
|
|
<refname>bti</refname> |
24 |
|
|
<refpurpose>send a tweet to twitter.com or identi.ca from the command line</refpurpose> |
25 |
|
|
</refnamediv> |
26 |
|
|
|
27 |
|
|
<refsynopsisdiv> |
28 |
|
|
<cmdsynopsis> |
29 |
|
|
<command>bti</command> |
30 |
|
|
<arg><option>--account account</option></arg> |
31 |
|
|
<arg><option>--password password</option></arg> |
32 |
gregoa |
1621 |
<arg><option>--action action</option></arg> |
33 |
|
|
<arg><option>--user screenname</option></arg> |
34 |
gregoa |
1473 |
<arg><option>--host HOST_NAME</option></arg> |
35 |
gregoa |
1507 |
<arg><option>--proxy PROXY:PORT</option></arg> |
36 |
gregoa |
1530 |
<arg><option>--logfile LOGFILE</option></arg> |
37 |
gregoa |
2157 |
<arg><option>--config CONFIGFILE</option></arg> |
38 |
gregoa |
2233 |
<arg><option>--replyto ID</option></arg> |
39 |
gregoa |
2336 |
<arg><option>--retweet ID</option></arg> |
40 |
gregoa |
1651 |
<arg><option>--page PAGENUMBER</option></arg> |
41 |
gregoa |
1473 |
<arg><option>--bash</option></arg> |
42 |
gregoa |
1651 |
<arg><option>--shrink-urls</option></arg> |
43 |
gregoa |
1473 |
<arg><option>--debug</option></arg> |
44 |
gregoa |
1651 |
<arg><option>--dry-run</option></arg> |
45 |
gregoa |
1739 |
<arg><option>--verbose</option></arg> |
46 |
gregoa |
1473 |
<arg><option>--version</option></arg> |
47 |
|
|
<arg><option>--help</option></arg> |
48 |
|
|
</cmdsynopsis> |
49 |
|
|
</refsynopsisdiv> |
50 |
|
|
|
51 |
|
|
<refsect1><title>DESCRIPTION</title> |
52 |
|
|
<para>bti sends a tweet message to twitter.com or identi.ca. |
53 |
|
|
</para> |
54 |
|
|
</refsect1> |
55 |
|
|
|
56 |
|
|
<refsect1><title>OPTIONS</title> |
57 |
|
|
<variablelist> |
58 |
|
|
<varlistentry> |
59 |
|
|
<term><option>--account account</option></term> |
60 |
|
|
<listitem> |
61 |
|
|
<para> |
62 |
|
|
Specify the twitter.com or identi.ca account name. |
63 |
|
|
</para> |
64 |
|
|
</listitem> |
65 |
|
|
</varlistentry> |
66 |
|
|
<varlistentry> |
67 |
|
|
<term><option>--password password</option></term> |
68 |
|
|
<listitem> |
69 |
|
|
<para> |
70 |
|
|
Specify the password of your twitter.com or identi.ca account. |
71 |
|
|
</para> |
72 |
|
|
</listitem> |
73 |
|
|
</varlistentry> |
74 |
|
|
<varlistentry> |
75 |
gregoa |
1621 |
<term><option>--action action</option></term> |
76 |
|
|
<listitem> |
77 |
|
|
<para> |
78 |
|
|
Specify the action which you want to perform. Valid options |
79 |
|
|
are "update" to send a message, "friends" to see your friends |
80 |
|
|
timeline, "public" to track public timeline, "replies" to see |
81 |
|
|
replies to your messages and "user" to see a specific user's |
82 |
gregoa |
2157 |
timeline. Default is "update". |
83 |
gregoa |
1621 |
</para> |
84 |
|
|
</listitem> |
85 |
|
|
</varlistentry> |
86 |
|
|
<varlistentry> |
87 |
|
|
<term><option>--user screenname</option></term> |
88 |
|
|
<listitem> |
89 |
|
|
<para> |
90 |
gregoa |
2157 |
Specify the user whose messages you want to see when the |
91 |
gregoa |
1621 |
action is "user". |
92 |
|
|
</para> |
93 |
|
|
</listitem> |
94 |
|
|
</varlistentry> |
95 |
|
|
<varlistentry> |
96 |
gregoa |
1473 |
<term><option>--host HOST_NAME</option></term> |
97 |
|
|
<listitem> |
98 |
|
|
<para> |
99 |
|
|
Specify the host which you want to send your message to. Valid |
100 |
|
|
options are "twitter" to send to twitter.com and "identica" to |
101 |
gregoa |
1739 |
send to identi.ca. |
102 |
|
|
|
103 |
gregoa |
2707 |
If you want to send the message to a custom StatusNet installation, |
104 |
gregoa |
1739 |
you should specify the API URI. For example identi.ca's URI is: |
105 |
|
|
https://identi.ca/api/statuses |
106 |
gregoa |
1473 |
</para> |
107 |
|
|
<para> |
108 |
|
|
If no host is specified, the default is to send to twitter.com. |
109 |
|
|
</para> |
110 |
|
|
</listitem> |
111 |
|
|
</varlistentry> |
112 |
|
|
<varlistentry> |
113 |
gregoa |
1507 |
<term><option>--proxy PROXY:PORT</option></term> |
114 |
|
|
<listitem> |
115 |
|
|
<para> |
116 |
|
|
Specify a http proxy value. This is not a required option, and |
117 |
|
|
only needed by systems that are behind a http proxy. |
118 |
|
|
</para> |
119 |
|
|
<para> |
120 |
gregoa |
1511 |
If --proxy is not specified but the environment variable |
121 |
|
|
'http_proxy' is set the latter will be used. |
122 |
gregoa |
1507 |
</para> |
123 |
|
|
</listitem> |
124 |
|
|
</varlistentry> |
125 |
|
|
<varlistentry> |
126 |
gregoa |
1530 |
<term><option>--logfile LOGFILE</option></term> |
127 |
|
|
<listitem> |
128 |
|
|
<para> |
129 |
|
|
Specify a logfile for bti to write status messages to. LOGFILE |
130 |
|
|
is in relation to the user's home directory, not an absolute |
131 |
|
|
path to a file. |
132 |
|
|
</para> |
133 |
|
|
</listitem> |
134 |
|
|
</varlistentry> |
135 |
|
|
<varlistentry> |
136 |
gregoa |
2157 |
<term><option>--config CONFIGFILE</option></term> |
137 |
|
|
<listitem> |
138 |
|
|
<para> |
139 |
|
|
Specify a config file for bti to read from. By default, bti |
140 |
|
|
looks in the ~/.bti file for config values. This default |
141 |
|
|
location can be overridden by setting a specific file with this |
142 |
|
|
option. |
143 |
|
|
</para> |
144 |
|
|
</listitem> |
145 |
|
|
</varlistentry> |
146 |
|
|
<varlistentry> |
147 |
gregoa |
2233 |
<term><option>--replyto ID</option></term> |
148 |
|
|
<listitem> |
149 |
|
|
<para> |
150 |
|
|
Status ID of a single post to which you want to create a threaded |
151 |
|
|
reply to. |
152 |
|
|
</para> |
153 |
|
|
<para> |
154 |
|
|
For twitter, this is ignored unless the message starts with the |
155 |
|
|
@name of the owner of the post with the status ID. |
156 |
|
|
</para> |
157 |
|
|
<para> |
158 |
|
|
For status.net, this can link any two messages into context with |
159 |
|
|
each other. Status.net will also link a message that contains an |
160 |
|
|
@name without this without regard to context. |
161 |
|
|
</para> |
162 |
|
|
</listitem> |
163 |
|
|
</varlistentry> |
164 |
|
|
<varlistentry> |
165 |
gregoa |
2336 |
<term><option>--retweet ID</option></term> |
166 |
|
|
<listitem> |
167 |
|
|
<para> |
168 |
|
|
Status ID of a single post which you want to retweet. |
169 |
|
|
</para> |
170 |
|
|
</listitem> |
171 |
|
|
</varlistentry> |
172 |
|
|
<varlistentry> |
173 |
gregoa |
1651 |
<term><option>--shrink-urls</option></term> |
174 |
|
|
<listitem> |
175 |
|
|
<para> |
176 |
|
|
Scans the tweet text for valid URL patterns and passes each |
177 |
|
|
through the supplied bti-shrink-urls script. The script will |
178 |
|
|
pass the URL to a web service that shrinks the URLs, making it |
179 |
|
|
more suitable for micro-blogging. |
180 |
|
|
</para> |
181 |
|
|
<para> |
182 |
gregoa |
2336 |
The following URL shrinking services are available: |
183 |
|
|
http://2tu.us/ (default) and http://bit.ly / http://j.mp |
184 |
gregoa |
1651 |
</para> |
185 |
gregoa |
2336 |
<para> |
186 |
|
|
See the documentation for bti-shrink-urls for the configuration options. |
187 |
|
|
</para> |
188 |
gregoa |
1651 |
</listitem> |
189 |
|
|
</varlistentry> |
190 |
|
|
<varlistentry> |
191 |
gregoa |
1473 |
<term><option>--debug</option></term> |
192 |
|
|
<listitem> |
193 |
|
|
<para>Print a whole bunch of debugging messages to stdout.</para> |
194 |
|
|
</listitem> |
195 |
|
|
</varlistentry> |
196 |
|
|
<varlistentry> |
197 |
gregoa |
1651 |
<term><option>--page PAGENUMBER</option></term> |
198 |
|
|
<listitem> |
199 |
|
|
<para> |
200 |
|
|
When the action is to retrieve updates, it usually retrieves |
201 |
|
|
only one page. If this option is used, the page number can be |
202 |
|
|
specified. |
203 |
|
|
</para> |
204 |
|
|
</listitem> |
205 |
|
|
</varlistentry> |
206 |
|
|
<varlistentry> |
207 |
|
|
<term><option>--dry-run</option></term> |
208 |
|
|
<listitem> |
209 |
|
|
<para> |
210 |
|
|
Performs all steps that would normally be done for a given |
211 |
|
|
action, but will not connect to the service to post or retrieve data. |
212 |
|
|
</para> |
213 |
|
|
</listitem> |
214 |
|
|
</varlistentry> |
215 |
|
|
<varlistentry> |
216 |
gregoa |
1739 |
<term><option>--verbose</option></term> |
217 |
|
|
<listitem> |
218 |
|
|
<para> |
219 |
gregoa |
2233 |
Verbose mode. Print status IDs and timestamps. |
220 |
gregoa |
1739 |
</para> |
221 |
|
|
</listitem> |
222 |
|
|
</varlistentry> |
223 |
|
|
<varlistentry> |
224 |
gregoa |
1473 |
<term><option>--bash</option></term> |
225 |
|
|
<listitem> |
226 |
|
|
<para> |
227 |
|
|
Add the working directory and a '$' in the tweet message to |
228 |
|
|
help specify it is coming from a command line. Don't put the |
229 |
|
|
working directory and the '$' in the tweet message. |
230 |
|
|
</para> |
231 |
gregoa |
2246 |
|
232 |
|
|
<para> |
233 |
|
|
This option implies <option>--background</option>. |
234 |
|
|
</para> |
235 |
|
|
</listitem> |
236 |
|
|
</varlistentry> |
237 |
|
|
<varlistentry> |
238 |
|
|
<term><option>--background</option></term> |
239 |
|
|
<listitem> |
240 |
gregoa |
1473 |
<para> |
241 |
gregoa |
2246 |
Do not report back any errors that might have |
242 |
|
|
happened when sending the message, and send it in the |
243 |
|
|
background, returning immediately, allowing the user |
244 |
|
|
to continue on. |
245 |
gregoa |
1473 |
</para> |
246 |
|
|
</listitem> |
247 |
|
|
</varlistentry> |
248 |
|
|
<varlistentry> |
249 |
|
|
<term><option>--version</option></term> |
250 |
|
|
<listitem> |
251 |
|
|
<para>Print version number.</para> |
252 |
|
|
</listitem> |
253 |
|
|
</varlistentry> |
254 |
|
|
<varlistentry> |
255 |
|
|
<term><option>--help</option></term> |
256 |
|
|
<listitem> |
257 |
|
|
<para>Print help text.</para> |
258 |
|
|
</listitem> |
259 |
|
|
</varlistentry> |
260 |
|
|
</variablelist> |
261 |
|
|
</refsect1> |
262 |
|
|
|
263 |
|
|
<refsect1> |
264 |
|
|
<title>DESCRIPTION</title> |
265 |
|
|
<para> |
266 |
|
|
bti provides an easy way to send tweet messages direct from the |
267 |
|
|
command line or any script. It reads the message on standard |
268 |
|
|
input and uses the account and password settings either from the |
269 |
|
|
command line options, or from a config file, to send the message |
270 |
|
|
out. |
271 |
|
|
</para> |
272 |
|
|
<para> |
273 |
gregoa |
2157 |
Its primary focus is to allow you to log everything that you |
274 |
gregoa |
1473 |
type into a bash shell, in a crazy, "this is what I'm doing right |
275 |
|
|
now!" type of way, letting the world follow along with you |
276 |
|
|
constant moving between directories and refreshing your email |
277 |
|
|
queue to see if there's anything interesting going on. |
278 |
|
|
</para> |
279 |
|
|
<para> |
280 |
|
|
To hook bti up to your bash shell, export the following variable: |
281 |
|
|
</para> |
282 |
|
|
<para> |
283 |
|
|
<literal> PROMPT_COMMAND='history 1 | sed -e "s/^\s*[0-9]*\s*//" | bti --bash'</literal> |
284 |
|
|
</para> |
285 |
|
|
<para> |
286 |
|
|
This example assumes that you have the |
287 |
|
|
<filename>~/.bti</filename> set up with your account and password |
288 |
|
|
information already in it, otherwise you can specify them as an |
289 |
|
|
option. |
290 |
|
|
</para> |
291 |
|
|
</refsect1> |
292 |
|
|
|
293 |
|
|
<refsect1> |
294 |
|
|
<title>CONFIGURATION</title> |
295 |
|
|
<para> |
296 |
|
|
The account and password can be stored in a configuration file |
297 |
|
|
in the users home directory in a file named |
298 |
gregoa |
2157 |
<filename>.bti</filename>. The structure of this file is as |
299 |
gregoa |
1473 |
follows: |
300 |
|
|
</para> |
301 |
|
|
<variablelist> |
302 |
|
|
<varlistentry> |
303 |
|
|
<term><option>account</option></term> |
304 |
|
|
<listitem> |
305 |
|
|
<para> |
306 |
|
|
The twitter.com or identi.ca account name you wish to use to send this |
307 |
|
|
message with. |
308 |
|
|
</para> |
309 |
|
|
</listitem> |
310 |
|
|
</varlistentry> |
311 |
|
|
<varlistentry> |
312 |
|
|
<term><option>password</option></term> |
313 |
|
|
<listitem> |
314 |
|
|
<para> |
315 |
|
|
The twitter.com or identi.ca password for the account you wish to use |
316 |
|
|
to send this message with. |
317 |
|
|
</para> |
318 |
|
|
</listitem> |
319 |
|
|
</varlistentry> |
320 |
gregoa |
1621 |
<varlistentry> |
321 |
|
|
<term><option>--action action</option></term> |
322 |
|
|
<listitem> |
323 |
|
|
<para> |
324 |
|
|
Specify the action which you want to perform. Valid options |
325 |
|
|
are "update" to send a message, "friends" to see your friends |
326 |
|
|
timeline, "public" to track public timeline, "replies" to see |
327 |
|
|
replies to your messages and "user" to see a specific user's |
328 |
|
|
timeline. |
329 |
|
|
</para> |
330 |
|
|
</listitem> |
331 |
|
|
</varlistentry> |
332 |
|
|
<varlistentry> |
333 |
|
|
<term><option>--user screenname</option></term> |
334 |
|
|
<listitem> |
335 |
|
|
<para> |
336 |
|
|
Specify the user you want to see his/her messages while the |
337 |
|
|
action is "user". |
338 |
|
|
</para> |
339 |
|
|
</listitem> |
340 |
|
|
</varlistentry> |
341 |
gregoa |
1473 |
<varlistentry> |
342 |
|
|
<term><option>host</option></term> |
343 |
|
|
<listitem> |
344 |
|
|
<para> |
345 |
|
|
The host you want to use to send the message to. Valid |
346 |
|
|
options are either "twitter" or "identica" to send to |
347 |
|
|
twitter.com or identi.ca respectively. |
348 |
gregoa |
1739 |
|
349 |
gregoa |
2707 |
If you want to send the message to a custom StatusNet installation, |
350 |
gregoa |
1739 |
you should specify the API URI. For example identi.ca's URI is: |
351 |
|
|
https://identi.ca/api/statuses. |
352 |
gregoa |
1473 |
</para> |
353 |
|
|
</listitem> |
354 |
|
|
</varlistentry> |
355 |
gregoa |
1507 |
<varlistentry> |
356 |
|
|
<term><option>proxy</option></term> |
357 |
|
|
<listitem> |
358 |
|
|
<para> |
359 |
|
|
The http proxy needed to send data out to the Internet. |
360 |
|
|
</para> |
361 |
|
|
</listitem> |
362 |
|
|
</varlistentry> |
363 |
gregoa |
1530 |
<varlistentry> |
364 |
|
|
<term><option>logfile</option></term> |
365 |
|
|
<listitem> |
366 |
|
|
<para> |
367 |
|
|
The logfile name for bti to write what happened to. |
368 |
|
|
This file is relative to the user's home directory. If this |
369 |
|
|
file is not specified here or on the command line, no logging |
370 |
|
|
will be written to the disk. |
371 |
|
|
</para> |
372 |
|
|
</listitem> |
373 |
|
|
</varlistentry> |
374 |
gregoa |
1651 |
<varlistentry> |
375 |
gregoa |
2233 |
<term><option>replyto</option></term> |
376 |
|
|
<listitem> |
377 |
|
|
<para> |
378 |
|
|
The status ID to which all notices will be linked to. |
379 |
|
|
</para> |
380 |
|
|
<para> |
381 |
|
|
There is no sane reason for a need to have this set in a |
382 |
|
|
config file. One such reason is to have all your messages |
383 |
|
|
as children to a particular status. |
384 |
|
|
</para> |
385 |
|
|
</listitem> |
386 |
|
|
</varlistentry> |
387 |
|
|
<varlistentry> |
388 |
gregoa |
1651 |
<term><option>shrink-urls</option></term> |
389 |
|
|
<listitem> |
390 |
|
|
<para> |
391 |
|
|
Setting this variable to 'true' or 'yes' will enable the URL |
392 |
|
|
shrinking feature. This is equivalent to using the |
393 |
|
|
--shrink-urls option. |
394 |
|
|
</para> |
395 |
|
|
</listitem> |
396 |
|
|
</varlistentry> |
397 |
gregoa |
1739 |
<varlistentry> |
398 |
|
|
<term><option>verbose</option></term> |
399 |
|
|
<listitem> |
400 |
|
|
<para> |
401 |
|
|
Setting this variable to 'true' or 'yes' will enable the |
402 |
|
|
verbose mode. |
403 |
|
|
</para> |
404 |
|
|
</listitem> |
405 |
|
|
</varlistentry> |
406 |
|
|
</variablelist> |
407 |
gregoa |
1473 |
<para> |
408 |
|
|
There is an example config file called |
409 |
|
|
<filename>bti.example</filename> in the source tree that shows |
410 |
|
|
the structure of the file if you need an example to work off of. |
411 |
|
|
</para> |
412 |
gregoa |
1511 |
<para> |
413 |
|
|
Configuration options have the following priority: |
414 |
|
|
</para> |
415 |
|
|
<variablelist> |
416 |
|
|
<varlistentry> |
417 |
|
|
<term></term> |
418 |
|
|
<listitem><para>command line option</para></listitem> |
419 |
|
|
</varlistentry> |
420 |
|
|
<varlistentry> |
421 |
|
|
<term></term> |
422 |
|
|
<listitem><para>config file option</para></listitem> |
423 |
|
|
</varlistentry> |
424 |
|
|
<varlistentry> |
425 |
|
|
<term></term> |
426 |
|
|
<listitem><para>environment variables</para></listitem> |
427 |
|
|
</varlistentry> |
428 |
|
|
</variablelist> |
429 |
|
|
<para> |
430 |
|
|
For example, command line options always override any config file |
431 |
gregoa |
2157 |
option, or any environment variables. Unless a config file is |
432 |
|
|
specified by the command line. At that point, the new config file is |
433 |
|
|
read, and any previous options set by a command line option, would be |
434 |
|
|
overridden. |
435 |
gregoa |
1511 |
</para> |
436 |
gregoa |
1473 |
</refsect1> |
437 |
|
|
|
438 |
|
|
<refsect1><title>AUTHOR</title> |
439 |
gregoa |
1739 |
<para>Written by Greg Kroah-Hartman <<email>greg@kroah.com</email>> and Amir Mohammad Saied <<email>amirsaied@gmail.com</email>>.</para> |
440 |
gregoa |
1473 |
</refsect1> |
441 |
|
|
|
442 |
|
|
</refentry> |
443 |
|
|
</section> |
444 |
|
|
</article> |