Giter Club home page Giter Club logo

mtbos-blogbot's Introduction

MTBoS Blogbot

I, Robot

This is the code that powers the @MTBoS_Blogbot, for those of you who like your RSS feed Twitterfied. Follow the Blogbot or check out the MTBoS Blogroll web page for regular updates from blogs around the mathtwitterblogosphere, which is a pretty cool place. Even for a robot.

Adding Yourself to the Blogroll

Feel free to tweet @MTBoS_Blogbot and let me/it know that you'd like to be added to the blogroll. Or, I suppose, let me know that you don't want to be on it anymore (I pulled your info from @Jstevens009's list on fishing4tech).

Of course, if you're a GitHub kind of person who's going to fork the repo anyway, you can just add yourself to blogroll.yaml (alphabetically by Twitter handle) and submit a pull request. Just make sure that the feed_url points to something that returns your XML feed.

Getting the Code

As you presumably know, the code is hosted at https://github.com/ctlusto/mtbos-blogbot.

To get your own copy of the repo and see what's what:

git clone git://github.com/ctlusto/mtbos-blogbot.git
cd mtbos-blogbot

You're going to need pip to install Python packages. If you don't already have it:

sudo easy_install pip

You're also going to need virtualenv to manage dependencies:

pip install virtualenv

Setting Up for Development

Create a virtual environment and install dependencies:

make env

If you already have a virtual environment, just install dependencies:

make deps

Activate your virtual environment:

source env/bin/activate

When you're done hacking, you can simply deactivate the virtual environment:

deactivate

Running Tests

LOLWUT!? There are no tests.

Firebase and Twitter

The Blogbot uses Firebase as a backend data store and the Twitter API to post updates. If you want your bot to do something useful, you'll need to set up a Firebase app and register your app with Twitter.

From there, you'll need to include some of your account credentials in order to authorize requests. The stuff you'll need to get is listed in config.example.py. Fill in the empty strings with your personal keys and tokens from their respective providers and rename the file config.py. (Make sure you don't check your actual config.py file into source control, please.)

Creating/Updating a Blogroll

The feeds you want to follow should live in blogroll.yaml. Just make sure that the feed_url points to something that returns XML (not, for example, the main blog page).

Save your changes and run:

make migrate

Any feeds that aren't already in Firebase will be added to the database and have a current snapshot recorded.

Tweeting Updates

To check for updates and tweet any new posts:

make publish

If you want to check for updates and tweet them on a regular basis, you can run blogbot.py as a Cron job. Just like a real robot.

Author

Chris Lusto

Twitter: @Lustomatical

Site: {math pun}

License

MIT

mtbos-blogbot's People

Contributors

ctlusto avatar

Watchers

James Cloos 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.