Git Product home page Git Product logo

auto-rt's Introduction

auto-rt

A script that listens for @ mentions using the Twitter Streaming API and automatically retweets them.

This isn't very robust, a loss of connection to the Streaming API will cause the process to die. Heroku will restart it but it won't be instantaneous. This script won't poll for updates that could've happened while the connection was lost.

It's deployed against http://twitter.com/gotanysnacks, an anonymous Twitter account. (hint: send a txt/email to skcansynatog at gotanysnacks.com, or mention it from your account)

Usage

This script is intended to be deployed on Heroku.

There are several environment variables used for configuration:

  • USER_ID: the id of the Twitter account this is running against. Used to determine if activity in the Streaming API is a mention or a post by this user.
  • APP_CONSUMER_KEY: OAuth consumer key
  • APP_CONSUMER_SECRET: OAuth consumer secret
  • USER_ACCESS_TOKEN: OAuth access token for the account to watch
  • USER_ACCESS_TOKEN_SECRET: OAuth secret for the account to watch

Procfile:

run: lein run -m auto-rt

Do something like

heroku ps:scale web=0 run=1

To run this script without requiring it to listen for HTTP connections.

License

Copyright © 2012 DGAF

Distributed under the Eclipse Public License, the same as Clojure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.