Giter Site home page Giter Site logo

jamesgarfield / mongobot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huntwelch/mongobot

0.0 2.0 0.0 3.05 MB

IRC bot for screwing around. Named not for MongoDB, but after Mongo from Blazing Saddles.

Python 95.64% Shell 0.22% Groovy 0.08% JavaScript 1.40% CSS 2.67%

mongobot's Introduction

Getting Started
===============

    mkvirtualenv MongoBot
    pip install -r requirements.txt
    
    To run bot: python medulla.py
    To run bot persistently so it will recover from crashes: python doctor.py

    You'll need to install MongoDB to use most of the features relating to people


Dafuq is going on?
==================

    For best results in answering this question, check out settings.py, 
    followed by medulla.py and cortex.py. Also, learn python. 


Advanced Usage
==============

    MongoBot is capable of running a number of web services and apis. For best
    results, run an nginx server and uwsgi server/deploy.ini. And by best results, 
    I mean any. More documentation on this once I figure out how I did it the 
    first time.

    Also, the markov functionality is based on redis, so you'll have to get a 
    redis server up and running.


Secret settings
===============

    You will need to create a file in the root folder called secrets.py.
    example.secrets.py has descriptions of each setting, just copy it to
    secrets.py and set away.


New features
============

    To create a new command in an existing brainmeat category, add the
    function to the class and add the decorator @axon. To add a help entry
    for the function, add @help("Help message.")

    To create a new command category, run this from the root directory: 
    
    python newbrains.py category_name

    This will create a file called category_name.py in brainmeats, with
    a class Category_name. Loading of this class will be automated, no
    other files need to be altered.


Philosophies
===========

    Don't nest logic when you can short circuit.

    BAD:

    if blah:
        for x in stuff:
            do stuff

    GOOD:

    if not blah:
        return

    for x in stuff:
        do stuff
    
    Try to stick to single quotes wherever possible.

    String interpolation is better than adding up strings. I'm totally 
    not great at remembering this, but I'm trying.

    When using in the chat room, you can pipe commands, i.e.:

    -babble Zaphod | -tweet

    ... will tweet whatever babble spits out.

    If you want a function to be pipeable to other functions, return the output
    instead of just chatting from the function. 
    
    Why would anyone add piping to a chat bot? I dunno. Things got out of hand.

To Do
=====

    + Probably make this readme better
    + add tweet at in twitting
    + phase out pageopen for Browse (possibly phaseout requests module)
    + reddit command breaks without specified subreddit
    + Clean up broca, decide what to do with it
    + link holdem to db, make persistant, open up sit/in/out functionality
    + finish holdem, needs testing and split pots probably don't work
    + stock game: account for splits and reverse splits
    + add @requires decorator, check for server, redis, mongo, have -features command to check.
      Function by function level? 

mongobot's People

Contributors

huntwelch avatar kenrobbins avatar elliottcarlson avatar joshuabergeron avatar johnmarc avatar jsbronder avatar huntrooms avatar kevinkn avatar

Watchers

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