1 |
<?xml version='1.0'?> |
2 |
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
3 |
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
4 |
|
5 |
<article> |
6 |
<section> |
7 |
<title>bti</title> |
8 |
<refentry> |
9 |
<refentryinfo> |
10 |
<title>bti</title> |
11 |
<date>May 2008</date> |
12 |
<productname>bti</productname> |
13 |
</refentryinfo> |
14 |
|
15 |
<refmeta> |
16 |
<refentrytitle>bti</refentrytitle> |
17 |
<manvolnum>1</manvolnum> |
18 |
<refmiscinfo class="version"></refmiscinfo> |
19 |
</refmeta> |
20 |
|
21 |
<refnamediv> |
22 |
<refname>bti</refname> |
23 |
<refpurpose>send a tweet to twitter.com or identi.ca from the command line</refpurpose> |
24 |
</refnamediv> |
25 |
|
26 |
<refsynopsisdiv> |
27 |
<cmdsynopsis> |
28 |
<command>bti</command> |
29 |
<arg><option>--account account</option></arg> |
30 |
<arg><option>--password password</option></arg> |
31 |
<arg><option>--host HOST_NAME</option></arg> |
32 |
<arg><option>--proxy PROXY:PORT</option></arg> |
33 |
<arg><option>--bash</option></arg> |
34 |
<arg><option>--debug</option></arg> |
35 |
<arg><option>--version</option></arg> |
36 |
<arg><option>--help</option></arg> |
37 |
</cmdsynopsis> |
38 |
</refsynopsisdiv> |
39 |
|
40 |
<refsect1><title>DESCRIPTION</title> |
41 |
<para>bti sends a tweet message to twitter.com or identi.ca. |
42 |
</para> |
43 |
</refsect1> |
44 |
|
45 |
<refsect1><title>OPTIONS</title> |
46 |
<variablelist> |
47 |
<varlistentry> |
48 |
<term><option>--account account</option></term> |
49 |
<listitem> |
50 |
<para> |
51 |
Specify the twitter.com or identi.ca account name. |
52 |
</para> |
53 |
</listitem> |
54 |
</varlistentry> |
55 |
<varlistentry> |
56 |
<term><option>--password password</option></term> |
57 |
<listitem> |
58 |
<para> |
59 |
Specify the password of your twitter.com or identi.ca account. |
60 |
</para> |
61 |
</listitem> |
62 |
</varlistentry> |
63 |
<varlistentry> |
64 |
<term><option>--host HOST_NAME</option></term> |
65 |
<listitem> |
66 |
<para> |
67 |
Specify the host which you want to send your message to. Valid |
68 |
options are "twitter" to send to twitter.com and "identica" to |
69 |
send to identi.ca. |
70 |
</para> |
71 |
<para> |
72 |
If no host is specified, the default is to send to twitter.com. |
73 |
</para> |
74 |
</listitem> |
75 |
</varlistentry> |
76 |
<varlistentry> |
77 |
<term><option>--proxy PROXY:PORT</option></term> |
78 |
<listitem> |
79 |
<para> |
80 |
Specify a http proxy value. This is not a required option, and |
81 |
only needed by systems that are behind a http proxy. |
82 |
</para> |
83 |
<para> |
84 |
If no host is specified, the default is to send to twitter.com. |
85 |
</para> |
86 |
</listitem> |
87 |
</varlistentry> |
88 |
<varlistentry> |
89 |
<term><option>--debug</option></term> |
90 |
<listitem> |
91 |
<para>Print a whole bunch of debugging messages to stdout.</para> |
92 |
</listitem> |
93 |
</varlistentry> |
94 |
<varlistentry> |
95 |
<term><option>--bash</option></term> |
96 |
<listitem> |
97 |
<para> |
98 |
Add the working directory and a '$' in the tweet message to |
99 |
help specify it is coming from a command line. Don't put the |
100 |
working directory and the '$' in the tweet message. |
101 |
</para> |
102 |
<para> |
103 |
This mode also does not report back any errors that might have |
104 |
happened when sending the message, and it sends it in the |
105 |
background, returning immediately, allowing the process to |
106 |
continue on. |
107 |
</para> |
108 |
</listitem> |
109 |
</varlistentry> |
110 |
<varlistentry> |
111 |
<term><option>--version</option></term> |
112 |
<listitem> |
113 |
<para>Print version number.</para> |
114 |
</listitem> |
115 |
</varlistentry> |
116 |
<varlistentry> |
117 |
<term><option>--help</option></term> |
118 |
<listitem> |
119 |
<para>Print help text.</para> |
120 |
</listitem> |
121 |
</varlistentry> |
122 |
</variablelist> |
123 |
</refsect1> |
124 |
|
125 |
<refsect1> |
126 |
<title>DESCRIPTION</title> |
127 |
<para> |
128 |
bti provides an easy way to send tweet messages direct from the |
129 |
command line or any script. It reads the message on standard |
130 |
input and uses the account and password settings either from the |
131 |
command line options, or from a config file, to send the message |
132 |
out. |
133 |
</para> |
134 |
<para> |
135 |
It's primary focus is to allow you to log everything that you |
136 |
type into a bash shell, in a crazy, "this is what I'm doing right |
137 |
now!" type of way, letting the world follow along with you |
138 |
constant moving between directories and refreshing your email |
139 |
queue to see if there's anything interesting going on. |
140 |
</para> |
141 |
<para> |
142 |
To hook bti up to your bash shell, export the following variable: |
143 |
</para> |
144 |
<para> |
145 |
<literal> PROMPT_COMMAND='history 1 | sed -e "s/^\s*[0-9]*\s*//" | bti --bash'</literal> |
146 |
</para> |
147 |
<para> |
148 |
This example assumes that you have the |
149 |
<filename>~/.bti</filename> set up with your account and password |
150 |
information already in it, otherwise you can specify them as an |
151 |
option. |
152 |
</para> |
153 |
</refsect1> |
154 |
|
155 |
<refsect1> |
156 |
<title>CONFIGURATION</title> |
157 |
<para> |
158 |
The account and password can be stored in a configuration file |
159 |
in the users home directory in a file named |
160 |
<filename>.bti</filename> The structure of this file is as |
161 |
follows: |
162 |
</para> |
163 |
<variablelist> |
164 |
<varlistentry> |
165 |
<term><option>account</option></term> |
166 |
<listitem> |
167 |
<para> |
168 |
The twitter.com or identi.ca account name you wish to use to send this |
169 |
message with. |
170 |
</para> |
171 |
</listitem> |
172 |
</varlistentry> |
173 |
<varlistentry> |
174 |
<term><option>password</option></term> |
175 |
<listitem> |
176 |
<para> |
177 |
The twitter.com or identi.ca password for the account you wish to use |
178 |
to send this message with. |
179 |
</para> |
180 |
</listitem> |
181 |
</varlistentry> |
182 |
<varlistentry> |
183 |
<term><option>host</option></term> |
184 |
<listitem> |
185 |
<para> |
186 |
The host you want to use to send the message to. Valid |
187 |
options are either "twitter" or "identica" to send to |
188 |
twitter.com or identi.ca respectively. |
189 |
</para> |
190 |
</listitem> |
191 |
</varlistentry> |
192 |
<varlistentry> |
193 |
<term><option>proxy</option></term> |
194 |
<listitem> |
195 |
<para> |
196 |
The http proxy needed to send data out to the Internet. |
197 |
</para> |
198 |
</listitem> |
199 |
</varlistentry> |
200 |
</variablelist> |
201 |
<para> |
202 |
There is an example config file called |
203 |
<filename>bti.example</filename> in the source tree that shows |
204 |
the structure of the file if you need an example to work off of. |
205 |
</para> |
206 |
</refsect1> |
207 |
|
208 |
<refsect1><title>AUTHOR</title> |
209 |
<para>Written by Greg Kroah-Hartman <email>greg@kroah.com</email>.</para> |
210 |
</refsect1> |
211 |
|
212 |
</refentry> |
213 |
</section> |
214 |
</article> |