marvin: A modular chat bot

[ bsd3, development, library, program ] [ Propose Tags ]

A framework for writing portable chat bots. Inspired by hubot. The documentation is on readthedocs: https://marvin.readthedocs.io


[Skip to Readme]
Versions [faq] 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.*), directory (>=1.2.6.2 && <1.3), filepath (==1.4.*), hashable (>=1.0 && <1.3), haskeline (>=0.7 && <1), http-client (==0.4.*), http-client-tls (>=0.2 && <0.4), http-types (>=0.8 && <1.0), lens (==4.*), lifted-async (>=0.8 && <0.10), lifted-base (==0.2.*), marvin (==0.1.*), marvin-interpolate (==1.0.*), monad-control (==1.*), monad-logger (==0.3.*), monad-loops (==0.4.*), mono-traversable (==1.0.*), mtl (>=2.2 && <3), mustache (>=0.2 && <2.2), network-uri (>=2.6.1.0 && <2.7), optparse-applicative (>=0.11 && <1), random (>=1.0 && <1.2), stm (>=2.0 && <2.5), text (>=1.0 && <1.3), text-icu (>=0.6 && <0.8), time (==1.*), transformers-base (==0.4.*), unordered-containers (==0.2.*), vector (>=0.11 && <1), wai (==3.*), warp (==3.*), warp-tls (==3.*), websockets (==0.9.*), wreq (==0.4.*), wuss (>=1.0 && <1.2) [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 Fri Feb 17 14:43:45 UTC 2017
Distributions NixOS:0.2.5
Executables marvin-init, marvin-pp
Downloads 5065 total (369 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-02-17 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for marvin-0.1.3

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

Links

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)