GithubHelp home page GithubHelp logo

ikbot's Introduction

ikbot

A hipchat bot written in Elixir.

Requirements

  • Elixir 1.0.1

Clone

$ git clone [email protected]:inaka/ikbot.git

Configuration

Copy the content from config/config.exs.template to config/config.exs and replace the **** with your information. and also select the scripts that you want to use, updating the 'scripts' list.

Example:

config/config.exs

use Mix.Config
config :ikbot,
  scripts:
    [
      "base",
      "devops"
    ],
  bing:
    %{
      key: 'bing_key_to_allow_search_images'
    }

config :hedwig,
  clients: [
    %{
      jid: "[email protected]",
      password: "your_secret_pwd",
      nickname: "ik bot",
      resource: "ikbot",
      config: %{
        server: "chat.hipchat.com",
        port: 5222,
        require_tls?: true,
        use_compression?: false,
        use_stream_management?: false,
        transport: :tcp
      },
      rooms: [
        "[email protected]"
      ],
      handlers: [
        {Ikbot.Hipchat, %{}}
      ]
    }
  ]

Run it

$ cd ikbot
$ mix deps.get
$ mix app
$ iex -S mix

Contact Us

For questions or general comments regarding the use of this library, please use our public hipchat room.

If you find any bugs or have a problem while using this library, please open an issue in this repo (or a pull request :)).

And you can check all of our open-source projects at inaka.github.io

ikbot's People

Contributors

amilkr avatar cabol avatar elbrujohalcon avatar igaray avatar jfacorro avatar spike886 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ikbot's Issues

Fulfill the open-source checklist

General Items

  • It has a github repo
  • It has a proper LICENSE file
  • It's hooked to a hipchat room
  • It's has a clear and useful README.md
  • It's documented (with examples)
  • It's tested

Exhibition

  • There is a blog post about it
  • It's shared on social networks
  • It's shared on reddit
  • It's shared on hacker news with a title like Show HN: description
  • It has a landing page built in github pages

Create your own issues

ikbot learn to [issue title]: [issue description] should result in a new issue in this repo with the corresponding title and desc.

Rock with Elvis

ikbot rock [repo-url] should run elvis on that repo.
ikbot rock [erlang-file-url] should run elvis on that file.

compile with erlang 18 / Elixir 1.0.4

Quite a number of compilation failures, I modified the mix.esx file to the following, changed a bunch of erlang:now() to erlang:timestamp() and recompiled:

defmodule Ikbot.Mixfile do
  use Mix.Project

  def project do
    [
      app: :ikbot,
      version: "0.0.1",
      elixir: "1.0.4",
      deps: deps
    ]
  end

  def application do
    [
      applications: [
        :httpotion,
        :hedwig
      ],
      mod: {Ikbot, []},
      env: []
    ]
  end

  defp deps do
    [
      {:jsx, github: "talentdeficit/jsx"},
      {:ibrowse, github: "cmullaparthi/ibrowse"},
      {:httpotion, "~> 0.2.0"},
      {:hedwig, github: "scrogson/hedwig"},
      {:pong, github: "inaka/pong", branch: "elbrujohalcon.rank", compile: "", app: false},
      {:exredis, github: "artemeff/exredis"}
    ]
  end
end

But now I'm stuck again, I'm receiving this compile error:

mix compile 

....elided... ... 
Compiled lib/ikbot/scripts/xkcd.ex
Compiled lib/ikbot/scripts/news.ex
lib/ikbot/ikbot_hipchat.ex:3: warning: undefined module attribute @usage, please remove access to @usage or explicitly set it to nil before access

== Compilation error on file lib/ikbot/scripts/pivotal.ex ==
** (UndefinedFunctionError) undefined function: Exredis.Api.__using__/1
    Exredis.Api.__using__([])
    lib/ikbot/scripts/pivotal.ex:2: (module)
    (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6

Quite new to the language. Any ideas?

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.