CydeWeys / service-changes

A Twitter bot that generates truthy MTA service change announcements

Home Page:http://twitter.com/NotMTA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fake MTA service changes

A bot that listens for tweets from @NYCTSubway and retweets them along with a fake service change announcement. Follow @NotMTA to see it in action!

Usage

  1. yarn install
  2. yarn dev to inspect some individual modules (served at localhost:5000):
    • /change: text of a randomly-generated service change announcement.
    • /bullet: a randomly-generated service bullet (the colored logos for each train line) using the MTA's font, layout and color schemes. In the future, this module could be used to generate fake service change posters like the ones you see hanging in the station.
    • /reason: just a randomly-generated reasons for the service change.
  3. cp .env.example .env and configure envs. You'll need credentials from your Twitter account for the Twitter envs.
  4. Configure envs TRACK and NODE_ENV. If TRACK is set, the Twitter streaming client will be passed its value as the user ID of the Twitter account to follow. (Note that user IDs are not the same as Twitter usernames – a user ID is an integer.) @NYCTSubway is user ID 66379182. If TRACK is unset, the string 'javascript' is passed to the streaming filter, to ensure plenty of tweets to test the settings. Set NODE_ENV=production to enable sending of tweets, in addition to console.loging them.
  5. yarn devstream to connect to the Twitter Streaming API and start listening for tweets.

About

A Twitter bot that generates truthy MTA service change announcements

http://twitter.com/NotMTA


Languages

Language:JavaScript 100.0%