GithubHelp home page GithubHelp logo

gleicon / ron_swanson_bot Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 2.14 MB

Ron Swanson's recipe for greatness and a python/gevent/bottle/APScheduler bot to run locally or heroku

JavaScript 96.72% Python 3.28%

ron_swanson_bot's Introduction

Ron Swanson bot

Generic twitter bot to run from heroku using python, gevent and APScheduler. It also has an example facebook application to authorize and post quotes to your timeline. All in the same process. Using canvas. Greatness achieved.

You can either pay a worker dyno to run your job or keep it at it is running off a greenlet started from app.py. Change the interval by editing jobs.py. Run jobs.py in a different process if you want.

To test locally:

  • you will need foreman, virtualenv, etc, etc

  • clone the repository

  • cd ron_swanson_bot

  • $ virtualenv --no-site-packages env

  • $ source env/bin/activate

  • $ pip install -r requirements.txt

  • To test locally create an .env file with your tweet credencials using the following env vars:

    • CONSUMER_KEY=
    • CONSUMER_SECRET=
    • ACCESS_TOKEN=
    • ACCESS_TOKEN_SECRET=
    • FB_APP_ID=
    • FB_APP_SECRET=

    run with:

    $ foreman start

  • To deploy: git init git add . git commit -m 'First commit' heroku create appname git push heroku master heroku config:add CONSUMER_KEY= CONSUMER_SECRET= ACCESS_TOKEN= ACCESS_TOKEN_SECRET= FB_APP_ID= FB_APP_SECRET= heroku logs

  • You can also run on Foreman/Virtualenv standalone in your server.

ron_swanson_bot's People

Contributors

gleicon avatar

Stargazers

Micah Walter avatar

Watchers

 avatar James Cloos avatar  avatar

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.