The marvin package

[Tags:bsd3, library, program, test]

A framework for writing portable chat bots. Inspired by hubot.

The best way to get started with this library is with the documentation on readthedocs: https://marvin.readthedocs.io


[Skip to Readme]

Properties

Versions 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
Change log CHANGELOG.md
Dependencies aeson (>=0.11 && <1.3), base (>=4.7 && <5), bytestring (>=0.10), conduit (>=1.2), configurator (>=0.3), deepseq (==1.*), 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), irc-conduit (>=0.2), lens (==4.*), lifted-async (>=0.8), lifted-base (>=0.2), marvin (>=0.1), marvin-interpolate (>=1.0), monad-control (==1.*), 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.*), transformers (>=0.4), 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 && <0.6), wuss (>=1.0) [details]
License BSD3
Copyright © 2016, 2017 Justus Adam
Author Justus Adam
Maintainer dev@justus.science
Category Development
Home page https://marvin.readthedocs.io
Bug tracker https://github.com/JustusAdam/marvin/issues
Source repository head: git clone https://github.com/JustusAdam/marvin
Uploaded Sun Mar 5 19:55:04 UTC 2017 by justus
Updated Mon Apr 17 11:28:27 UTC 2017 by justus to revision 1
Distributions LTSHaskell:0.2.3, NixOS:0.2.3, Tumbleweed:0.2.3
Downloads 607 total (40 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2017-03-05 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for marvin

Readme for marvin-0.2.3

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!")

Testing and Talking

There's a slack channel where you can ask questions or play around with a test instance of marvin.

It's currently invite-only, so send me an email if you would like to join.

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)