Giter Club home page Giter Club logo

cardinal's Introduction

Meet Cardinal.

Cardinal is your new best friend and personal assistant on IRC. A modular, Twisted-based Python IRC bot, Cardinal has plenty of common features (such as a calculator, fetching of page titles, etc.) as well as some more interesting ones (integration with Last.fm and YouTube searching.) If you're a developer, it's easy to create your own plugins in a matter of minutes.

What can Cardinal do?

Out of the box Cardinal can...

  • Grab the page titles for links
  • Search for YouTube videos and link them in chat
  • Tell you the weather
  • Show who's listening to what with Last.fm integration
  • Message you with a time-based reminder
  • Act as a calculator and unit/currency converter
  • Save "notes" -- effectively turns Cardinal into an info bot
  • Grab definitions from Urban Dictionary
  • ... and more!

But Cardinal is still in active development! Features are being added as quickly as they can be thought up and coded. It's also easy to write your own plugins for even more functionality.

Basic Usage

Running Cardinal is as simple as typing ./cardinal.py. Before running Cardinal, you should ensure that you have set your network settings in the config.json file, or run ./cardinal.py -h to use command line arguments to set the network and channels you would like Cardinal to connect to.

Before running Cardinal, you should add your nick and vhost to the plugins/admin/config.json file in the format nick@vhost in order to take advantage of admin-only commands.

Installation Note

Make sure you have Python 2.7 installed, and run pip install -r requirements.txt to install any Python dependencies.

It is recommended that you install and use Cardinal inside of a Python virtualenv. You can do so by running the following command inside of your cloned repository.

virtualenv -p /usr/bin/python2.7 . && source bin/activate

In the future, you will just have to remember to call source bin/activate.

Writing Plugins

Cardinal plugins are designed to be simple to write while still providing tons of power. Here's a sample to show what a very simple plugin might look like:

class HelloWorldPlugin(object):
    def hello(self, cardinal, user, channel, msg):
        nick, ident, vhost = user.group(1), user.group(2), user.group(3)
        cardinal.sendMsg(channel, "Hello %s!" % nick)
    hello.commands = ['hello', 'hi']
    hello.help = ["Responds to the user with a greeting.",
                  "Syntax: .hello [user to greet]"]

def setup():
    return HelloWorldPlugin()

While it's not difficult to write plugins for Cardinal, lots of optional functionality is provided, and thus this section is too large to include in the README. Please visit the wiki to learn about writing plugins.

Contributing

If you have found a bug, feel free to submit a patch or simply open an issue on this repository and I will get to it as soon as possible. Be sure to add your name to the CONTRIBUTORS file in a separate commit on the same branch as your modification so that I can give credit where credit is due.

Cardinal is a public, open-source project, licensed under the MIT License. Anyone may contribute.

cardinal's People

Contributors

johnmaguire avatar tskuse avatar someguy123 avatar helixspiral avatar

Watchers

Adam Straub 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.