Git Product home page Git Product logo

andy's Introduction

⚠️ THIS IS ARCHIVED AND WILL NOT BE UPDATED ⚠️

About this codebase

Andy is the little Bot that Could.

I guess the aim is to make my own little intelligent agent, pulling in information from everywhere I can and generally making my day easier. I'll try and make it as modular as possible so code reuse is possible wherever I can :)

Adding a new plugin

  • Create a new folder in toolbox/plugins
  • Create an _init_.py file inside it
  • In the file:
  • Import toolbox
  • Make a class in it that imports toolbox.base_plugin called Plugin
  • Set the plugin name through self.pluginname
  • Set the data save file in config.filenames, key should be self.pluginname

You should be able to call the plugin in Andy.interact() by typing pluginname [action]

Default parts of plugins

  • self._data - data storage that will be automatically loaded/saved on shutdown. If you want to change this, overload self._load and self._save before you do anything.
  • self._save and self._load - save/load functionality for pickling self._data
  • self._help - returns a list of non-private functions, will be expanding to use docstrings Some Day Soon. :)
  • self._handle_text - parses the default data from Andy.interact() and runs public functions. [pluginname] [publicfuncname] will run said function.

File Caching Notes

  • If a file has an expiry of -1, it'll be cached forever

andy's People

Contributors

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