A Star Wars Filter


by
900w

So there’s this Star Wars movies coming out next week, and I don’t know if you’ve heard about it?

There is a lot of Star Wars everywhere right now; researchers have calculated that 85% of the Internet is currently Star Wars, with TV in close pursuit.

This is either bumming you out for one of two reasons:

  1. You couldn’t care less about Star Wars.
  2. You don’t want some idiot to spoil the movie for you.

In light of this, I’ve created a filter to get to at least the worst spoilers—I obviously can’t filter things I don’t know are in the movie, but filtering the names of actors and characters who might kick the bucket goes a long way.

The filter consists of three components:

  1. a word list
  2. a regular expression
  3. a Tweetbot mute filter

I’ll address these in reverse order, since you probably want to skip straight to the mute filter.

Tweetbot Mute Filter

The Tweetbot Twitter client’s mute filter uses the built-in mute filter support, which lets you to create a filter that can be imported just by clicking a link. This is what clicking that link on OS X with Tweetbot’s desktop client installed looks like:

Mute prompt in Tweetbot for Mac

As you can see, 14 of the (many, many) tweets in my timeline matched the filter. The matched tweets might look like this:

Screenshot of the tweets caught by the filter

How you choose to mute is ultimately up to you, so I leave it to you to decide on your mute settings.

If you don’t already have Tweetbot, you can buy the Mac client and the iOS client

To import my Star Wars filter, click the button below:

Click to mute Star Wars in Tweetbot

(For some reason, this only works on iOS sometimes; I’m able to get it working, as long as I don’t click the button from within Tweetbot, but from Safari instead. You can always click the button on OS X and let the mute filter carry over from there.)

When or if you get it working on iOS, this is the prompt you’ll see:

Mute prompt in Tweetbot for iOS

Regular Expression

The Tweetbot link is just a regular expression (regex) of the wordlist prepended by Tweetbot’s regex mute filter URL, which looks something like this:

tweetbot:///mute/keyword?regex=1&text=

The regex itself breaks the layout of this page when I feature it, but you can find it on this gist, if you want to take a peak at it. I can’t promise that someone won’t post spoilers in the comments of that page, though. You can go see the regex in action in this demo, however.

Bear in mind that I am not programmatic genius, so I’m sure there are many ways this pattern could be optimized. Right now, it looks like it gets the job done, but I can’t vouch for how it might affect the performance of Tweetbot and so on.

Word List

Finally, the list of characters, actors, and objects I try to match the filter against. It’s not perfect, I’m sure, but hopefully it won’t filter things you didn’t intend for it to do. The list does include some actors, though, so if you insist on reading about what Oscar Isaac and Harrison Ford, spoilers are not, you’ll have to fashion your own filter.

On that final note, here is the word list in its entirety; the list shouldn’t contain spoilers, unless you really don’t want to see a list of some of the actors and characters in the movie:

  • Maz Kanata
  • Han Solo, Harrison Ford+
  • Leia, Carrie Fisher+
  • Skywalker, Hamill+
  • Chewbacca, Chewie, Wookie(e), Mayhew+
  • Kylo, Adam Driver+
  • Daisy Ridley+
  • Boyega+
  • Abrams+, JJA+, J.J.A.+, J. J. A.+
  • (General) Hux, Domhnall+, Gleeson+
  • (Captain) Phasma, Gwendoline (Christie)+
  • Vader, Darth—sorry, @darth
  • Snoke
  • R2-D2
  • C3PO
  • Lor San, Tekka, (Max von) Sydow+
  • BB-8
  • (Poe) Dameron, Oscar Isaac+

  • Star Wars, Force Awakens
  • Lightsaber
  • Jedi
  • Stormtrooper
  • Millennium Falcon

  • Was Rey …, ( Rey )
  • Death Star
  • Jar Jar
  • George Lucas
  • X-wing, X wing
  • TIE Fighter

+ Refers to a filter based on the actor/director’s real name. You may not want to include this, if you want to follow the person—while risking the spoiler. You may have wondered why Lupita Nyong’o is not on the list. Go figure.

Keep in mind that I’ve only created a Tweetbot-compatible mute filter. If anyone wants to create something like a browser extension, please do and give me a link so I can enjoy a somewhat spoiler-free Internet as well.

PS: Do not contact me about straight-up spoilers to include in my mute filter. Don’t be an idiot.

Further Reading

Updates

  • Dec 22: Replace ( )? with ( |\-)? in order to filter URLs, too.
  • Dec 22: Add more keywords.