+Summary of changes from v009 to v010
+============================================
+
+Greg Kroah-Hartman (3):
+ add --proxy support to command line
+ check in changes to bti.1 from previous xml changes
+ document the order that config options are handled
+
+gregor herrmann (2):
+ Fix up documentation of proxy option
+ use the http_proxy environment variable if it is present
+
+
Summary of changes from v008 to v009
============================================
.RS 4
Specify a http proxy value\&. This is not a required option, and only needed by systems that are behind a http proxy\&.
.sp
-If no host is specified, the default is to send to twitter\&.com\&.
+If \-\-proxy is not specified but the environment variable \'http_proxy\' is set the latter will be used\&.
.RE
.PP
\fB\-\-debug\fR
There is an example config file called
\FCbti\&.example\F[]
in the source tree that shows the structure of the file if you need an example to work off of\&.
+.PP
+Configuration options have the following priority:
+.PP
+.RS 4
+command line option
+.RE
+.PP
+.RS 4
+config file option
+.RE
+.PP
+.RS 4
+environment variables
+.RE
+.PP
+For example, command line options always override any config file option, or any environment variables\&.
.SH "AUTHOR"
.PP
Written by Greg Kroah\-Hartman
session->host = HOST_IDENTICA;
free(host);
}
- if (proxy)
+ if (proxy) {
+ if (session->proxy)
+ free(session->proxy);
session->proxy = proxy;
+ }
/* Free buffer and close file. */
free(line);
{ "account", 1, NULL, 'a' },
{ "password", 1, NULL, 'p' },
{ "host", 1, NULL, 'H' },
+ { "proxy", 1, NULL, 'P' },
{ "help", 0, NULL, 'h' },
{ "bash", 0, NULL, 'b' },
{ "version", 0, NULL, 'v' },
char *tweet;
int retval;
int option;
+ char *http_proxy;
#if 0
char *home = getenv("HOME");
char *pwd = getenv("PWD");
}
curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Set environment variables first, before reading command line options
+ * or config file values. */
+ http_proxy = getenv("http_proxy");
+ if (http_proxy) {
+ if (session->proxy)
+ free(session->proxy);
+ session->proxy = strdup(http_proxy);
+ dbg("http_proxy = %s\n", session->proxy);
+ }
+
parse_configfile(session);
while (1) {
- option = getopt_long_only(argc, argv, "dqe:p:H:a:h",
+ option = getopt_long_only(argc, argv, "dqe:p:P:H:a:h",
options, NULL);
if (option == -1)
break;
session->password = strdup(optarg);
dbg("password = %s\n", session->password);
break;
+ case 'P':
+ if (session->proxy)
+ free(session->proxy);
+ session->proxy = strdup(optarg);
+ dbg("proxy = %s\n", session->proxy);
+ break;
case 'H':
if (strcasecmp(optarg, "twitter") == 0)
session->host = HOST_TWITTER;
only needed by systems that are behind a http proxy.
</para>
<para>
- If no host is specified, the default is to send to twitter.com.
+ If --proxy is not specified but the environment variable
+ 'http_proxy' is set the latter will be used.
</para>
</listitem>
</varlistentry>
<filename>bti.example</filename> in the source tree that shows
the structure of the file if you need an example to work off of.
</para>
+ <para>
+ Configuration options have the following priority:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term></term>
+ <listitem><para>command line option</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term></term>
+ <listitem><para>config file option</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term></term>
+ <listitem><para>environment variables</para></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ For example, command line options always override any config file
+ option, or any environment variables.
+ </para>
</refsect1>
<refsect1><title>AUTHOR</title>