2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
12 <productname>bti</productname>
16 <refentrytitle>bti</refentrytitle>
17 <manvolnum>1</manvolnum>
18 <refmiscinfo class="version"></refmiscinfo>
22 <refname>bti</refname>
23 <refpurpose>send a tweet to twitter.com or identi.ca from the command line</refpurpose>
28 <command>bti</command>
29 <arg><option>--account account</option></arg>
30 <arg><option>--password password</option></arg>
31 <arg><option>--action action</option></arg>
32 <arg><option>--user screenname</option></arg>
33 <arg><option>--host HOST_NAME</option></arg>
34 <arg><option>--proxy PROXY:PORT</option></arg>
35 <arg><option>--logfile LOGFILE</option></arg>
36 <arg><option>--page PAGENUMBER</option></arg>
37 <arg><option>--bash</option></arg>
38 <arg><option>--shrink-urls</option></arg>
39 <arg><option>--debug</option></arg>
40 <arg><option>--dry-run</option></arg>
41 <arg><option>--verbose</option></arg>
42 <arg><option>--version</option></arg>
43 <arg><option>--help</option></arg>
47 <refsect1><title>DESCRIPTION</title>
48 <para>bti sends a tweet message to twitter.com or identi.ca.
52 <refsect1><title>OPTIONS</title>
55 <term><option>--account account</option></term>
58 Specify the twitter.com or identi.ca account name.
63 <term><option>--password password</option></term>
66 Specify the password of your twitter.com or identi.ca account.
71 <term><option>--action action</option></term>
74 Specify the action which you want to perform. Valid options
75 are "update" to send a message, "friends" to see your friends
76 timeline, "public" to track public timeline, "replies" to see
77 replies to your messages and "user" to see a specific user's
83 <term><option>--user screenname</option></term>
86 Specify the user you want to see his/her messages while the
92 <term><option>--host HOST_NAME</option></term>
95 Specify the host which you want to send your message to. Valid
96 options are "twitter" to send to twitter.com and "identica" to
99 If you want to send the message to a custom laconi.ca installation,
100 you should specify the API URI. For example identi.ca's URI is:
101 https://identi.ca/api/statuses
106 <term><option>--proxy PROXY:PORT</option></term>
109 Specify a http proxy value. This is not a required option, and
110 only needed by systems that are behind a http proxy.
113 If --proxy is not specified but the environment variable
114 'http_proxy' is set the latter will be used.
119 <term><option>--logfile LOGFILE</option></term>
122 Specify a logfile for bti to write status messages to. LOGFILE
123 is in relation to the user's home directory, not an absolute
129 <term><option>--shrink-urls</option></term>
132 Scans the tweet text for valid URL patterns and passes each
133 through the supplied bti-shrink-urls script. The script will
134 pass the URL to a web service that shrinks the URLs, making it
135 more suitable for micro-blogging.
138 Currently, only http://2tu.us/ is used as a URL shrinking service.
143 <term><option>--debug</option></term>
145 <para>Print a whole bunch of debugging messages to stdout.</para>
149 <term><option>--page PAGENUMBER</option></term>
152 When the action is to retrieve updates, it usually retrieves
153 only one page. If this option is used, the page number can be
159 <term><option>--dry-run</option></term>
162 Performs all steps that would normally be done for a given
163 action, but will not connect to the service to post or retrieve data.
168 <term><option>--verbose</option></term>
176 <term><option>--bash</option></term>
179 Add the working directory and a '$' in the tweet message to
180 help specify it is coming from a command line. Don't put the
181 working directory and the '$' in the tweet message.
184 This mode also does not report back any errors that might have
185 happened when sending the message, and it sends it in the
186 background, returning immediately, allowing the process to
192 <term><option>--version</option></term>
194 <para>Print version number.</para>
198 <term><option>--help</option></term>
200 <para>Print help text.</para>
207 <title>DESCRIPTION</title>
209 bti provides an easy way to send tweet messages direct from the
210 command line or any script. It reads the message on standard
211 input and uses the account and password settings either from the
212 command line options, or from a config file, to send the message
216 It's primary focus is to allow you to log everything that you
217 type into a bash shell, in a crazy, "this is what I'm doing right
218 now!" type of way, letting the world follow along with you
219 constant moving between directories and refreshing your email
220 queue to see if there's anything interesting going on.
223 To hook bti up to your bash shell, export the following variable:
226 <literal> PROMPT_COMMAND='history 1 | sed -e "s/^\s*[0-9]*\s*//" | bti --bash'</literal>
229 This example assumes that you have the
230 <filename>~/.bti</filename> set up with your account and password
231 information already in it, otherwise you can specify them as an
237 <title>CONFIGURATION</title>
239 The account and password can be stored in a configuration file
240 in the users home directory in a file named
241 <filename>.bti</filename> The structure of this file is as
246 <term><option>account</option></term>
249 The twitter.com or identi.ca account name you wish to use to send this
255 <term><option>password</option></term>
258 The twitter.com or identi.ca password for the account you wish to use
259 to send this message with.
264 <term><option>--action action</option></term>
267 Specify the action which you want to perform. Valid options
268 are "update" to send a message, "friends" to see your friends
269 timeline, "public" to track public timeline, "replies" to see
270 replies to your messages and "user" to see a specific user's
276 <term><option>--user screenname</option></term>
279 Specify the user you want to see his/her messages while the
285 <term><option>host</option></term>
288 The host you want to use to send the message to. Valid
289 options are either "twitter" or "identica" to send to
290 twitter.com or identi.ca respectively.
292 If you want to send the message to a custom laconi.ca installation,
293 you should specify the API URI. For example identi.ca's URI is:
294 https://identi.ca/api/statuses.
299 <term><option>proxy</option></term>
302 The http proxy needed to send data out to the Internet.
307 <term><option>logfile</option></term>
310 The logfile name for bti to write what happened to.
311 This file is relative to the user's home directory. If this
312 file is not specified here or on the command line, no logging
313 will be written to the disk.
318 <term><option>shrink-urls</option></term>
321 Setting this variable to 'true' or 'yes' will enable the URL
322 shrinking feature. This is equivalent to using the
323 --shrink-urls option.
328 <term><option>verbose</option></term>
331 Setting this variable to 'true' or 'yes' will enable the
338 There is an example config file called
339 <filename>bti.example</filename> in the source tree that shows
340 the structure of the file if you need an example to work off of.
343 Configuration options have the following priority:
348 <listitem><para>command line option</para></listitem>
352 <listitem><para>config file option</para></listitem>
356 <listitem><para>environment variables</para></listitem>
360 For example, command line options always override any config file
361 option, or any environment variables.
365 <refsect1><title>AUTHOR</title>
366 <para>Written by Greg Kroah-Hartman <<email>greg@kroah.com</email>> and Amir Mohammad Saied <<email>amirsaied@gmail.com</email>>.</para>