marvin: A modular chat bot

[ bsd3, development, library, program ] [ Propose Tags ]
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5
Change log CHANGELOG.md
Dependencies aeson (>=0.11 && <1.2), base (>=4.7 && <5), bytestring (>=0.10), configurator (>=0.3), deepseq (>=1 && <2), directory (>=1.2), filepath (>=1.4), hashable (>=1.0), haskeline (>=0.7 && <1), http-client (>=0.4 && <0.6), http-client-tls (>=0.2 && <0.4), http-types (>=0.8 && <1.0), lens (>=4 && <5), lifted-async (>=0.8), lifted-base (>=0.2), marvin (>=0.1), marvin-interpolate (>=1.0), monad-control (>=1 && <2), monad-logger (>=0.3), monad-loops (>=0.4), mtl (>=2.2 && <3), mustache (>=2.0), network-uri, optparse-applicative (>=0.11 && <1), random (>=1.0), stm (>=2.0), text (>=1.0), text-icu (>=0.6 && <0.8), time (>=1 && <2), transformers (>=0.4), transformers-base (>=0.4 && <0.5), unordered-containers (>=0.2), vector (>=0.11 && <1), wai (>=3 && <4), warp (>=3 && <4), warp-tls (>=3 && <4), websockets (>=0.9), wreq (>=0.4 && <0.6), wuss (>=1.0) [details]
License BSD-3-Clause
Copyright Copyright: (c) 2016 Justus Adam
Author JustusAdam
Maintainer dev@justus.science
Category Development
Home page https://marvin.readthedocs.io
Source repo head: git clone https://github.com/JustusAdam/marvin
Uploaded by justus at 2017-02-18T09:11:56Z
Distributions
Executables marvin-init, marvin-pp
Downloads 12674 total (51 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-02-18 [all 1 reports]

Readme for marvin-0.1.5

[back to package description]

Marvin, the paranoid bot (⍺ stage)

Travis Hackage

Marvin is an attempt to combine the ease of use of hubot with the typesafety and easy syntax of Haskell and the performance gains from compiled languages.

Installing and using marvin

The verbose documentation can be found on readthedocs https://marvin.readthedocs.io. It should hopefully answer all your questions.

Installation instructions are on this documentation page.

A teaser

module MyScript where

import Marvin.Prelude

script :: IsAdapter a => ScriptInit a
script = defineScript "my-script" $ do
    hear "sudo (.+)" $ do
        match <- getMatch

        reply $(isL "All right, i'll do #{match !! 1}")
    
    respond "repeat" $ do
        message <- getMessage

        send $(isL "You wrote #{message}")
    
    respond "what is in file (\\w+)\\??" $ do
        match <- getMatch 
        let file = match !! 1

        contents <- liftIO $ readFile file

        send contents
    
    enterIn "#random" $ do
        user <- getUser
        username <- getUsername user

        send $(isL "Hello #{username} welcome to the random channel!")

Contributing

Any kind of contribution is very welcome.

Issues and errors

If you are a marvin user, please report any error, issues, or improvement suggestions to the issue section or write me an email.

Testing

I welcome anybody who tests marvin by deploying it. Especially testing different adapters is a huge help.

Hacking

If you want to hack on marvin, feel free to do so and send me your changes as pull requests.

Current hot places to get started:

  • Convenient HTTP requests API in Marvin.Util.HTTP.
  • Convenient JSON handling API in Marvin.Util.JSON.
  • New adapters as submodules of Marvin.Adapter.
  • A basic library of scripts (maybe as a Marvin.Scripts.Prelude module?) (inspiration: https://github.com/github/hubot-scripts)