Modify

#597 closed enhancement (fixed)

Search channel support for Twitter

Reported by: ilf@… Owned by: geert
Priority: normal Milestone:
Component: Twitter Version: 1.2.6
Keywords: patch Cc:
IRC client+version: Client-independent Operating System: Public server
OS version/distro:

Description

tircd has this nice feature of displaying updated search results in a seperate channel, by /j #tag and /topic #tag #tag:

If you want to have updated search results for a specific term delivered, you can /join <any channel> then set the /topic for the channnel to your search query. Results that match that query will be sent to that channel. The /topic can be almost anything supported by the twitter search (see http://search.twitter.com/operators for exmaples). Using the 'near' option is not currently supported.

This would be cool in BitlBee, too.

Attachments (4)

bitlbee-tracking-channels.patch (15.5 KB) - added by Artem Savkov <artem.savkov@…> at 2012-12-23T15:46:35Z.
twitter search channels patch
bitlbee_tracking_channels_r965.patch (15.5 KB) - added by Artem Savkov <artem.savkov@…> at 2013-01-16T11:35:34Z.
version with a couple of fixes that applies cleanly to bzr965
bitlbee_tracking_channels_r1010.patch (15.5 KB) - added by Artem Savkov <artem.savkov@…> at 2014-02-26T07:53:13Z.
jgeboski_tracking_channels_r1060.patch (20.5 KB) - added by dx at 2014-12-24T18:33:00Z.
Whole new patch to do tracking channels by jgeboski, fixing many of the issues of the old one and adding more features

Download all attachments as: .zip

Change History (31)

comment:2 Changed at 2011-05-23T19:54:48Z by tim@…

This would be a very nice feature to have.

comment:3 Changed at 2011-07-28T07:33:35Z by lkraav <leho@…>

+1

comment:4 Changed at 2011-08-10T06:46:10Z by marc@…

maybe through a /query <search> inside the #twitter_channel?

comment:5 Changed at 2011-08-15T23:34:37Z by anonymous

Another vote for this...

comment:6 Changed at 2011-08-27T10:30:04Z by wilmer

Sorry guys, this really isn't going to happen any time soon. The search API call is JSON-only and BitlBee uses XML. I'm not going to add a JSON dependency any time soon so for now this is impossible.

Actually https://dev.twitter.com/docs/api/1/get/search shows that it supports JSON and ... ATOM. That's not very useful either though.

comment:7 Changed at 2011-10-14T11:09:51Z by anonymous

According to https://dev.twitter.com/discussions/1765 ATOM is XML based and should be parse-able as XML

comment:8 Changed at 2011-10-14T15:38:56Z by wilmer

Yes, I know. Not going to happen. That's a nice hack for getting that stuff into an RSS reader. The last thing this code needs is a completely separate parser for a lossy compatibility format, just for searches.

comment:9 Changed at 2011-10-15T17:29:31Z by pesco

awww, this would be cool. and json is really trivial to parse, we can probably roll our own (or someone else's) to avoid any outside dependency.

remember what randall said! ;)

comment:11 Changed at 2012-02-12T14:29:55Z by ilf

wilmer: Any opinion on the saved searches as posted in comment 10?

comment:12 Changed at 2012-06-30T11:41:01Z by lkraav <leho@…>

Sitting at Akademy 2012 and would really like to /join #akademy on bitlbee right now. Yes I know, PatchWelcome. :>

Changed at 2012-12-23T15:46:35Z by Artem Savkov <artem.savkov@…>

twitter search channels patch

comment:13 Changed at 2012-12-23T15:52:18Z by Artem Savkov <artem.savkov@…>

Here's the patch I'm currently using for twitter "search" channels. works only with hashtags, not normal searches.

Usage:

> chat add twitter #hashtag
> /j #hashtag

It probably needs some tweaking and there are quirks that I'm not sure how to work around (e.g. having to rejoin every channel after acc off/acc on). But if someone wants to test it here you go. You have to have JSON, i.e. bzr revision 951 or later to apply this.

Changed at 2013-01-16T11:35:34Z by Artem Savkov <artem.savkov@…>

version with a couple of fixes that applies cleanly to bzr965

comment:14 in reply to:  8 ; Changed at 2013-08-01T21:14:16Z by anonymous

Replying to wilmer:

Yes, I know. Not going to happen. That's a nice hack for getting that stuff into an RSS reader. The last thing this code needs is a completely separate parser for a lossy compatibility format, just for searches.

Why not add an optionnal dependency?

comment:15 in reply to:  14 ; Changed at 2013-08-01T21:34:45Z by wilmer

The point you're responding to is no longer relevant, since BitlBee now uses JSON for Twitter - any other flavours of the Twitter API are no longer supported.

comment:16 in reply to:  15 Changed at 2013-08-06T12:18:05Z by ilf@…

Replying to wilmer:

The point you're responding to is no longer relevant, since BitlBee now uses JSON for Twitter - any other flavours of the Twitter API are no longer supported.

Does this mean that since your original argument for not implementing it is now gone, we will get this feature? :)

comment:17 Changed at 2013-08-08T07:36:20Z by wilmer

Indeed. There's a patch in this bug already, even. I just haven't had a chance to look at it yet, and am thinking of whether the UI for it works the way I want it to..

comment:18 Changed at 2013-11-27T23:48:49Z by FiXato@…

Any update on this? :)

comment:19 Changed at 2013-12-07T10:03:34Z by ilf@…

I'd (still) love this, too. Also, lists should probably also be possible like this, no?

comment:20 Changed at 2014-02-04T06:51:34Z by dx

Keywords: patch added

comment:21 Changed at 2014-02-26T01:59:43Z by FiXato@…

Is there an updated patch available for those who would like to try this on the most recent builds?

Changed at 2014-02-26T07:53:13Z by Artem Savkov <artem.savkov@…>

comment:22 in reply to:  21 ; Changed at 2014-02-26T07:53:45Z by Artem Savkov <artem.savkov@…>

Replying to FiXato@…:

Is there an updated patch available for those who would like to try this on the most recent builds?

Heres a r1010 rebased patch.

comment:23 Changed at 2014-02-26T09:58:52Z by FiXato@…

Thanks Artem! Works nicely so far! :D

comment:24 Changed at 2014-07-23T12:38:14Z by madduck

Wow, looking forward to this *so much*

comment:25 in reply to:  22 Changed at 2014-12-21T05:30:24Z by FiXato

Replying to Artem Savkov <artem.savkov@…>:

Replying to FiXato@…:

Is there an updated patch available for those who would like to try this on the most recent builds?

Heres a r1010 rebased patch.

Sorry for the belated thanks. Thanks! :P Since we're now on 1070, and this still hasn't seem to have made it into the repo (afaik at least), is there any chance for an updated patch?

Changed at 2014-12-24T18:33:00Z by dx

Whole new patch to do tracking channels by jgeboski, fixing many of the issues of the old one and adding more features

comment:26 Changed at 2014-12-24T18:48:53Z by dx

jgeboski's description of the patch:

[PATCH] twitter: implemented filter based group chats

Filter group chats allow for the ability to read the tweets of select users without actually following the users, and/or track keywords or hashtags. A filter group chat can have multiple users, keywords, or hashtags. These users, keywords, or hashtags can span multiple group chats. This allows for rather robust filter organization.

The underlying structure for the filters is based on linked list, as using the glib hash tables requires >= glib-2.16 for sanity. Since the glib requirement of bitlbee is only 2.14, linked list are used in order to prevent an overly complex implementation.

The idea for this patch was inspired by Artem Savkov's "Twitter search channels" patch.

Usage:

In order to use the filter group chats, a group chat must be added to the twitter account. The channel room name is either follow:username, track:keyword, and/or track:#hashtag. Multiple elements can be used by separating each element by a semicolon.

Main difference with the older patch is that this one allows both follow and track channels, where track channels aren't restricted to hashtags only, and tracking channel users aren't added to the blist permanently (they were leaking), or joined to the channel (no more join spam)

Applies cleanly to bzr revisions 1011-1060, including the 3.2.2 release.

comment:27 Changed at 2015-05-05T14:57:00Z by dx

Resolution: fixed
Status: newclosed

This is now applied and is part of the 3.4 release, see the "filter channels" section of https://wiki.bitlbee.org/HowtoTwitter for usage instructions

Modify Ticket

Action
as closed The owner will remain geert.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.