Greg Kroah-Hartman [Fri, 18 Feb 2011 23:28:43 +0000 (15:28 -0800)]
config.c: fix up some compiler warnings
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 14 Jan 2011 15:05:17 +0000 (07:05 -0800)]
Revert "turn on some better compiler warnings."
This reverts commit
78188317f96392e12e51e02f9a94150f0ac1786f.
Turns out that autogen.sh generates this properly, I had forgotten to
run that.
Thanks to L. Alberto for pointing this out.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 14 Jan 2011 01:36:49 +0000 (17:36 -0800)]
rewrite the config parser
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+.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 14 Jan 2011 00:22:26 +0000 (16:22 -0800)]
fix compiler warning with bti_output_line
Stupid, forgot to mark it as a void function.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 14 Jan 2011 00:21:48 +0000 (16:21 -0800)]
move debug to bti.h
This is so that other .c files can call dbg();
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 14 Jan 2011 00:20:43 +0000 (16:20 -0800)]
turn on some better compiler warnings.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 12 Jan 2011 23:04:20 +0000 (15:04 -0800)]
release 029
Greg Kroah-Hartman [Wed, 12 Jan 2011 22:52:11 +0000 (14:52 -0800)]
move output logic to one function
This is in preparation for colored output.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 12 Jan 2011 22:46:50 +0000 (14:46 -0800)]
add config.c
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 12 Jan 2011 22:16:46 +0000 (14:16 -0800)]
create bti.h
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 12 Jan 2011 22:11:26 +0000 (14:11 -0800)]
move verbose flag into the session structure
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 12 Jan 2011 19:09:20 +0000 (11:09 -0800)]
reformat README to have a bit shorter lines
Greg Kroah-Hartman [Wed, 12 Jan 2011 19:06:33 +0000 (11:06 -0800)]
Merge branch 'oauth-readme' of https://github.com/agimenez/bti into agimenez-oauth-readme
* 'oauth-readme' of https://github.com/agimenez/bti:
Document how to configure OAuth.
Greg Kroah-Hartman [Wed, 12 Jan 2011 19:03:16 +0000 (11:03 -0800)]
Merge testing branch into master
Greg Kroah-Hartman [Wed, 12 Jan 2011 19:01:39 +0000 (11:01 -0800)]
Merge https://github.com/leif81/bti into main tree
This fixes an issue with twitter queries for non-oauth portions
of the api.
Greg Kroah-Hartman [Wed, 12 Jan 2011 19:01:02 +0000 (11:01 -0800)]
updated man pages generated from the docbook source
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
gregor herrmann [Sun, 2 Jan 2011 00:31:29 +0000 (01:31 +0100)]
Active --dry-run for OAuth.
Guard the oauth_http_post/_get with an '!session->dry_run'
conditional, and add a dbg() statement before.
http://bugs.debian.org/608608
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
gregor herrmann [Fri, 17 Dec 2010 21:35:13 +0000 (22:35 +0100)]
Document the new --retweet feature in bti.xml and add it to bash completion.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
gregor herrmann [Fri, 17 Dec 2010 21:14:29 +0000 (22:14 +0100)]
Add documentation for new shrink_host feature in bti-shrink-urls.
Document the configuration of bti-shrink-urls in bti-shrink-urls.xml,
bti.xml, and add a commented out example to bti.example.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
L. Alberto Giménez [Sun, 9 Jan 2011 16:02:04 +0000 (17:02 +0100)]
Document how to configure OAuth.
Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
Leif Gruenwoldt [Tue, 4 Jan 2011 02:48:41 +0000 (21:48 -0500)]
user and public actions may not require auth
Dwi Sasongko S [Sat, 13 Nov 2010 03:54:56 +0000 (10:54 +0700)]
Support proper 'reply_to' and 'retweet'
Signed-off-by: Dwi Sasongko S <ruckuus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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:
http://bit.ly/a/your_api_key
Amir Mohammad Saied [Sun, 7 Nov 2010 09:46:16 +0000 (13:16 +0330)]
Fixing Identi.ca's OAuth request_token URI
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):
675 #if 0 // oauth_version 1.0 Rev A
676 if (!oauth_param_exists(argv,argc,"oauth_callback")) {
677 snprintf(oarg, 1024, "oauth_callback=oob");
678 oauth_add_param_to_array(argcp, argvp, oarg);
679 }
680 #endif
So for now, we have to add this to our request_token URI.
Amir Mohammad Saied [Thu, 2 Sep 2010 13:42:07 +0000 (18:12 +0430)]
Update my copyright date.
Greg Kroah-Hartman [Thu, 2 Sep 2010 01:30:29 +0000 (18:30 -0700)]
release 028
Greg Kroah-Hartman [Thu, 2 Sep 2010 01:27:15 +0000 (18:27 -0700)]
Reduce the number of calls to fprintf.
Thanks to Flameeyes for the original patch, just changed it a bit
to work with the latest tree and to handle the version as a string.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 2 Sep 2010 01:24:18 +0000 (18:24 -0700)]
Update my copyright date.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 17:59:24 +0000 (19:59 +0200)]
Collapse more fprintf() calls.
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 15:07:35 +0000 (17:07 +0200)]
Split --background from --bash, and make the latter imply the former.
This allows to use send-in-background without mangling the message's text.
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 17:56:28 +0000 (19:56 +0200)]
Typo fix.
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 14:56:28 +0000 (16:56 +0200)]
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.
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 14:46:03 +0000 (16:46 +0200)]
Remove autoscan-generated bad tests.
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 14:44:45 +0000 (16:44 +0200)]
build system: use AC_SEARCH_LIBS rather than assuming -ldl is needed.
On a number of operating systems, such as the *BSD, the dlopen() function
is present in the standard C library, not in a separate libdl library.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diego Elio 'Flameeyes' Pettenò [Fri, 27 Aug 2010 14:41:25 +0000 (16:41 +0200)]
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>
Greg Kroah-Hartman [Wed, 18 Aug 2010 01:02:03 +0000 (18:02 -0700)]
long line cleanups
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:55:01 +0000 (17:55 -0700)]
more formatting cleanups
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:48:30 +0000 (17:48 -0700)]
whitespace cleanups for bti.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:48:09 +0000 (17:48 -0700)]
new version of checkpatch.pl from 2.6.35-rc1 kernel
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:42:01 +0000 (17:42 -0700)]
Fixup typo in Makefile.am found by @applehq
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:03:15 +0000 (17:03 -0700)]
release 027
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 18 Aug 2010 00:00:33 +0000 (17:00 -0700)]
fix up the autoconf checking for liboauth and other libraries
Start using pkg-config as its supposed to be used (hopefully)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Amir Mohammad Saied [Tue, 10 Aug 2010 23:18:39 +0000 (03:48 +0430)]
- Cosmetics
- Escaping tweet before POSTing it
Greg Kroah-Hartman [Wed, 28 Jul 2010 00:31:13 +0000 (17:31 -0700)]
Merge branch 'master' into oath-test
Conflicts:
bti.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Amir Mohammad Saied [Tue, 27 Jul 2010 16:19:13 +0000 (20:49 +0430)]
Leftovers from last commit, accepting account and, password from options
Amir Mohammad Saied [Tue, 27 Jul 2010 16:01:13 +0000 (20:31 +0430)]
HTTP basic auth for StatusNet instances
Merging back all HTTP basic auth codebase, mostly needed for custom
StatusNet instances with no OAuth service provider.
Daniel Cordero [Thu, 22 Jul 2010 18:52:57 +0000 (19:52 +0100)]
Fix a warning: unused variable message
"file" became unused in commit
6fe2642650486b6ca6c2a6eadbd50246fbdd2edd
Daniel Cordero [Tue, 16 Jun 2009 20:55:03 +0000 (21:54 +0059)]
Add a replyto configuration option
Daniel Cordero [Tue, 16 Jun 2009 20:55:02 +0000 (21:54 +0059)]
Support for replying to notices
Allow the user to specify a single ID so that interfaces can show the
nice "in reply to" links (or "in context" for status.net installations).
Daniel Cordero [Tue, 16 Jun 2009 20:55:02 +0000 (21:54 +0059)]
Verbose mode shows status IDs
Greg Kroah-Hartman [Thu, 22 Jul 2010 17:10:35 +0000 (10:10 -0700)]
error out if liboauth is not present
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Amir Mohammad Saied [Thu, 22 Jul 2010 14:37:49 +0000 (19:07 +0430)]
OAuth for both twitter, and identi.ca
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.
Greg Kroah-Hartman [Thu, 17 Jun 2010 23:31:15 +0000 (16:31 -0700)]
Merge branch 'master' into oath
Michel Alexandre Salim [Thu, 17 Jun 2010 20:28:43 +0000 (22:28 +0200)]
Fix Implicit linking against -ldl
Greg Kroah-Hartman [Mon, 24 May 2010 19:32:06 +0000 (12:32 -0700)]
add oath.keys from twitter.com
Greg Kroah-Hartman [Wed, 19 May 2010 19:10:58 +0000 (12:10 -0700)]
release 026
Greg Kroah-Hartman [Wed, 19 May 2010 19:07:45 +0000 (12:07 -0700)]
Add ability to override default config file option
Thanks to Reuben Thomas <rrt@sc3d.org> for this idea.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 19 May 2010 18:53:42 +0000 (11:53 -0700)]
add a configfile option to the core data structure
In anticipation of adding the option to select where your config
file is at.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 19 May 2010 18:45:44 +0000 (11:45 -0700)]
init the readline function after parsing the command line options
This lets us properly debug the readline function choice if
we need to.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 23 Apr 2010 03:28:13 +0000 (20:28 -0700)]
update bti.1 from the xml changes
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Reuben Thomas [Thu, 15 Apr 2010 11:14:52 +0000 (12:14 +0100)]
Typo fixes for bti(1)
Greg Kroah-Hartman [Thu, 22 Apr 2010 19:06:50 +0000 (12:06 -0700)]
another minor codingstyle fix
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 22 Apr 2010 19:06:30 +0000 (12:06 -0700)]
updated version of checkpatch.pl
taken from Linux 2.6.34-rc5
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 22 Apr 2010 19:04:43 +0000 (12:04 -0700)]
minor coding style cleanup.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev [Mon, 12 Apr 2010 18:49:57 +0000 (12:49 -0600)]
bti: fix a crash for echo -n|bti
My previous patch was not thought out completely and so the new bti
crashes if fed an input without a newline, like this:
echo -n "status test" | bti
The obvious fix seems the most appropriate approach in this case.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
Greg Kroah-Hartman [Sat, 9 Jan 2010 23:22:17 +0000 (15:22 -0800)]
release 025
Greg Kroah-Hartman [Sat, 9 Jan 2010 23:17:16 +0000 (15:17 -0800)]
Remove link-time dependancy on readline
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.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
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.
Reported as http://bugs.debian.org/563099
Amir Mohammad Saied [Thu, 31 Dec 2009 10:39:25 +0000 (14:09 +0330)]
Merge remote branch 'gregkh/master'
Amir Mohammad Saied [Thu, 31 Dec 2009 10:37:05 +0000 (14:07 +0330)]
Removing explicit mentions of twitter
Amir Mohammad Saied [Thu, 31 Dec 2009 10:24:36 +0000 (13:54 +0330)]
If there's no host specified, the session host is already pointing to twitter, but hosturl is empty
Greg Kroah-Hartman [Wed, 2 Dec 2009 01:41:36 +0000 (17:41 -0800)]
release 024
Greg Kroah-Hartman [Wed, 2 Dec 2009 01:15:30 +0000 (17:15 -0800)]
use "quiet" mode of building if present.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Wed, 2 Dec 2009 01:10:52 +0000 (17:10 -0800)]
fix up some compiler warnings in read_password
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ben Boeckel [Tue, 1 Dec 2009 23:59:45 +0000 (18:59 -0500)]
Disable echo when reading the password
Greg Kroah-Hartman [Thu, 13 Aug 2009 18:07:24 +0000 (11:07 -0700)]
fix crash when --debug is set
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 13 Aug 2009 04:23:49 +0000 (21:23 -0700)]
don't free an array on the stack
Greg Kroah-Hartman [Thu, 13 Aug 2009 04:13:03 +0000 (21:13 -0700)]
more coding style cleanups
Greg Kroah-Hartman [Thu, 13 Aug 2009 04:09:22 +0000 (21:09 -0700)]
clean up some trailing whitespace
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
Greg Kroah-Hartman [Thu, 13 Aug 2009 03:53:19 +0000 (20:53 -0700)]
fix compiler warning about fprintf
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>
Greg Kroah-Hartman [Wed, 27 May 2009 20:45:53 +0000 (13:45 -0700)]
release 023
Amir Mohammad Saied [Wed, 27 May 2009 18:02:06 +0000 (22:32 +0430)]
Updating AUTHORs and copyright section
Amir Mohammad Saied [Thu, 21 May 2009 09:53:37 +0000 (14:23 +0430)]
Updating documents, both for the new verbose mode, and custom laconi.ca installations.
Amir Mohammad Saied [Wed, 20 May 2009 07:14:32 +0000 (11:44 +0430)]
verbose option for bash completion script
Amir Mohammad Saied [Tue, 19 May 2009 14:33:07 +0000 (19:03 +0430)]
Verbose mode for bti
Amir Mohammad Saied [Sun, 10 May 2009 11:18:55 +0000 (15:48 +0430)]
https for twitter
Greg Kroah-Hartman [Tue, 5 May 2009 06:17:45 +0000 (23:17 -0700)]
release 022
Greg Kroah-Hartman [Tue, 5 May 2009 06:03:32 +0000 (23:03 -0700)]
Merge branch 'master' of git://github.com/amir/bti
gregor herrmann [Mon, 4 May 2009 14:39:48 +0000 (16:39 +0200)]
bti: use ssl for identi.ca
Greg Kroah-Hartman [Tue, 5 May 2009 05:49:48 +0000 (22:49 -0700)]
Merge branch 'master' of gregkh@/linux/kernel/git/gregkh/bti
Greg Kroah-Hartman [Tue, 5 May 2009 05:49:21 +0000 (22:49 -0700)]
fix build warning from time patch.
J.R. Mauro [Thu, 30 Apr 2009 00:35:19 +0000 (20:35 -0400)]
bti: show timestamp in statuses
Make parse_statuses() print timestamps
Signed-off-by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Amir Mohammad Saied [Mon, 4 May 2009 06:43:07 +0000 (11:13 +0430)]
Updating config example file
Amir Mohammad Saied [Mon, 4 May 2009 06:24:26 +0000 (10:54 +0430)]
Support for custom bti installations
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
Greg Kroah-Hartman [Tue, 14 Apr 2009 21:03:49 +0000 (14:03 -0700)]
add the script to the tarball.
Greg Kroah-Hartman [Tue, 14 Apr 2009 21:01:35 +0000 (14:01 -0700)]
release 021
Greg Kroah-Hartman [Tue, 14 Apr 2009 21:01:06 +0000 (14:01 -0700)]
bump version to 021