Giter VIP home page Giter VIP logo

badgebot's Introduction

BadgeBot

A twitter bot that retweets your Fedora Badges!

Try it out

To try it out, first install the dependencies:

$ yum install tweepy fedmsg python-fedmsg-meta-fedora-infrastructure

Then, copy fedmsg.d/twitter-secrets.py.example to fedmsg.d/twitter-secrets.py. Open it in your editor:

config = dict(
    consumer_key        = "abcdefg12345678",
    consumer_secret     = "abcdefg12345678",
    access_token_key    = "abcdefg12345678",
    access_token_secret = "abcdefg12345678",
)

You'll need to visit https://dev.twitter.com and create an 'application' in order to get these api keys.

Also, take a look at fedmsg.d/badgebot-basics.py:

config = dict(

    # Only tweet fedmsg messages with this in the topic
    badgebot_topic_filter='fedbadges',

    # Only tweet fedmsg messages that have to do with this person.
    # If it is the None value, then just tweet about everyone.
    badgebot_fas_username=None, # 'ralph',
)

Finally, run the script:

$ python badgebot.py

Systemd

You can run it under systemd for 24hour badge twittification! Check out install.sh:

$ sudo ./install.sh && sudo journalctl -u badgebot --follow
+ cp badgebot.py /usr/local/bin/badgebot.py
+ cp /home/threebean/devel/badgebot/badgebot.service /usr/lib/systemd/system/badgebot.service
+ cp fedmsg.d/badgebot-basics.py fedmsg.d/twitter-secrets.py /etc/fedmsg.d/.
+ systemctl daemon-reload
+ systemctl restart badgebot
-- Logs begin at Sun 2013-07-28 07:27:21 CDT. --
Aug 04 16:07:47 radek systemd[1]: Starting A Twitter bot for your Fedora Badges.  Wow....
Aug 04 16:07:47 radek systemd[1]: Started A Twitter bot for your Fedora Badges.  Wow..
Aug 04 16:07:48 radek badgebot.py[9155]: Setting up twitter connection.
Aug 04 16:07:48 radek badgebot.py[9155]: Looking for messages with 'fedbadges' in the topic
Aug 04 16:07:48 radek badgebot.py[9155]: Relating to any user at all!
Aug 04 16:07:48 radek badgebot.py[9155]: Posting up to listen on the fedmsg bus.  Waiting for a message...

badgebot's People

Contributors

decause avatar ralphbean avatar

Watchers

 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.