Giter Club home page Giter Club logo

camptownladies's Introduction

Camptownladies

A singing twitter bot.

Camptownladies does linguistic analysis in order to identify tweets matching the metrical rhythm of the first line of the traditional American minstrel song "Camptown Races", and respond appropriately: "doo-dah, doo-dah".

In its original install, camptownladies ran for over 2 years using the Twitter account @camptownladies, evoking amusement, confusion, and sometimes inexplicable rage. Recently the account was flagged as spam and threatened with a ban, so I've taken it out of service.

Configuration

  1. Install prerequisites:

     perl -MCPAN -e 'install qw(Encode Net::Twitter Lingua::EN::Syllable Lingua::EN::Phoneme Text::Language::Guess);'
    
  2. Create a Twitter account for your bot and sign in.

  3. Register a new Twitter app at https://dev.twitter.com/apps/new.

  4. Copy the consumer key and consumer secret into the appropriate variables in bot.pl, then create an OAuth access token and copy it and the access token secret in as well.

Execution

Each time camptownladies runs, it will pull in the latest 20 tweets from the public timeline via Twitter's API and analyze them. If any of them match the desired pattern, it will reply to that tweet. Since none of them are guaranteed to match, it may require a few runs before it replies.

You can add a cron task to periodically run bot.pl, e.g.

# m h dom mon dow    command
  * * *   *   *      /home/username/camptownladies/bot.pl >>/tmp/camptownladies.log

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

camptownladies's People

Contributors

rfreebern avatar

Watchers

 avatar  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.