A Twitterrific Troll Filter

By Lachlan Hardy
1120h Sunday, 03 August 2008 Permalink

Talking to some friends recently about the signal-to-noise ratio on Twitter, I realised they hadn’t seen the Twitterific readme file. It contains some “Power User” settings that you can run in your terminal. Some you may find useful; others not so much.

I only use two. The first is straightforward. The discontinuity of real names in Twitterific jars me. I prefer the consistency of usernames everywhere, so I use a simple switch to displayScreenName instead. The real value, however, lies in the tweetTextFilter command.

This command allows you to define an ICU regular expression to filter pretty much anything under the sun. My example below isn’t very complicated. It simply blocks all tweets that mention either Techcrunch, or ‘griefer’, or refer to a user by name of ‘fanboi’. The difference between the last two being that I see no references to ‘griefer’ at all, whereas I can still see when ‘fanboi’ replies to me but not when others reply to, or reference, her or him. The first file is just my .gitignore file to exclude the actual filter I use.

Update: I’ve added the ‘Olympics’ and ‘080808’ because I’m a grouch. (Well, partly because I’m stupidly busy, but mostly because I’m a grouch.)

I decided to post this after seeing Tantek's work towards a Troll Filter for Twitter searches . There are people and sites I prefer to exclude from my life where possible. Mostly because they continually take time and energy for little return.

This is a simple method for cutting those sites/people from at least one part of your life. I still follow the occasional link to Techcrunch and similar sites that’s been encoded by TinyURL et al because I’m not quite ready for a scorched earth policy, but every other mention slips me by. And guess what? I don’t miss it at all.

As for the infrequent and occasional griefer or fanboi-inspiring micro-celebrity in my life, I carry on blissfully ignorant of whatever negative emotions they typically cause in me that earned them the brand.

I've posted the commands on Github’s Gist for anybody who wants to fork it and add their own parameters (and because I wanted to try out Gist ). I’d love to see anybody expand on this, or any of the other power options. If you want to confirm your regular expressions do what you planned, there is a live testing page available .