The --retweet ID arguments were not handled properly, and bti asked all the time
for an ID. Now bti handles properly the ID passed by parameter on the
command-line.
Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
Instead of a hand-tuned string compare functions that were needed
for every single config option, use a "real" parser to properly handle
key/value pairs. This handles quoting of lines and other fun things.
Logic is based on code from udev, written by Kay Sievers, licensed under
the GPLv2+.
This splits the config parsing logic out to a single file so we all
don't have to go blind by accidentally looking at the horror that it
imparts on our soul if we notice it.
Moved the main data structure into there, this will let us
(hopefully) start refactoring the code to be a bit more readable
and maintainable over the long-run.
Justin Forest [Sun, 17 Oct 2010 05:02:12 +0000 (09:02 +0400)]
Support shrinking with bit.ly and j.mp.
To use bit.ly or j.mp you need to specify the host name in ~/.bti with
shrink_host, your bit.ly login with shrink_bitly_login and your bit.ly key with
shrink_bitly_key. You can register at:
http://bit.ly/a/sign_up
If you already have an account, you can find your API key at:
Revision "a" of OAuth 1.0 mandates the presence of "oauth_callback"
parameter.
Usually libraries appends an "oob" (Out of Band) oauth_callback if you
don't provide a valid callback url, and don't specify that you don't
want "OAuth 1.0a".
But apparently our library of choice for OAuth (liboauth) does not do
this, though the code is in library but commented out.
src/oauth.c:675-680 (as in HEAD, and 0.9.0 tarball):
Use arrays rather than pointers for static strings.
While this change does not do anything on most common systems, as
executables are not PIC, it is very useful when dealing with Position
Independent Executables (PIE) as used for instance by Gentoo Hardened.
build system: use consistently pkg-config to check for dependencies
Rather than rely on the old m4 macros for libxml2 and libcurl, which were
also misused, always use PKG_CHECK_MODULES (also assuming a new enough
version that calls AC_SUBST by itself), and fix the Makefile.am to use
_CFLAGS properly as well.
Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It's a bold move from the old HTTP auth to only OAuth. Since twitter is
going to drop http auth in next 10 days, and identi.ca has an OAuth
service provider, it seems dropping HTTP auth support from bti isn't
that bad.
You need to add your consumer key, and secret in ~/.bti:
consumer_key=yourkey
consumer_secret=yoursecret
bti will help you to get your "access token key", and "access token
secret". Put them in your ~/.bti and you're ready to go.
Pete Zaitcev [Sun, 21 Mar 2010 20:46:03 +0000 (14:46 -0600)]
bti: suppress prompt if fed from a pipe
Do not use readline for non-interactive sessions (e.g. those taking
input from a pipe or file). This way stray prompts are not shown.
Explicit prompts are retained, in case some script expects them.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch divorces bti from depending on readline. It now
will try to work with any readline-like library on your system,
and if none is found, fall back to an internal function.
This will solve the problems that distros are having with the
readline-6 license change to GPLv3 and bti staying at GPLv2.
Logic for this is taken from e2fsprogs, which implemented this
a long time ago for the same type of reason.
gregor herrmann [Thu, 31 Dec 2009 02:41:50 +0000 (03:41 +0100)]
Name correct hosts in prompts.
The prompt "Enter twitter {account,password}" is a bit misleading
if host is set to identi.ca or a custim host.
Add hostname to the session struct and use in for prompting and logging.
The group should not be printed out at startup if debug is set,
as it is not always set. This came in in the "add group support"
patch, it was probably used for debugging that code.
gregor herrmann [Tue, 30 Jun 2009 17:28:24 +0000 (19:28 +0200)]
BTI should not display password while user types it
Add password handling logic to not display the password on the
command line. Code is based on logic from:
http://dev.kryo.se/iodine/browser/src/common.c
Marvin Vek [Wed, 22 Jul 2009 21:07:14 +0000 (23:07 +0200)]
Add laconica group support
As you offered on Identi.ca in reply to my question on Laconica group
support (http://identi.ca/notice/6205615), created a patch for it.
Been like 6 years when i learned and wrote my last basic C code, but
tested it out and seems to be working fine.
Signed-off-by: Marvin Vek <laen@onedot.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now one can pass the URL of a custom laconica installation as value of
host (the both previous "twitter" and "identica" are still valid
though). The passed URL should be the base path of where API endpoints
are located. e.g., identica' baseurl is:
http://identi.ca/api/statuses
And twit.tv's army (which is a laconica instance) is:
http://army.twit.tv/api/statuses