Skip to content

Commit

Permalink
Add nicer IRC color printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Luminarys committed Jul 17, 2016
1 parent 6fd4409 commit ac4bca4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@
erl_crash.dump
*.ez
config/secret.exs
*.swp
8 changes: 8 additions & 0 deletions lib/kaguya/util.ex
Expand Up @@ -204,6 +204,14 @@ defmodule Kaguya.Util do
end
end

def color(foreground) do
"" <> apply(Kaguya.Util, foreground, [])
end

def color(foreground, background) do
"" <> apply(Kaguya.Util, foreground, []) <> (apply(Kaguya.Util, background, []) |> String.replace("", ","))
end

def clear, do: ""
def white, do: "00"
def black, do: "01"
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Expand Up @@ -4,7 +4,7 @@ defmodule Kaguya.Mixfile do
def project do
[
app: :kaguya,
version: "0.4.7",
version: "0.4.8",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
@@ -1,2 +1,2 @@
%{"earmark": {:hex, :earmark, "0.1.19"},
"ex_doc": {:hex, :ex_doc, "0.11.1"}}
%{"earmark": {:hex, :earmark, "0.1.19", "ffec54f520a11b711532c23d8a52b75a74c09697062d10613fa2dbdf8a9db36e", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.11.1", "43a16e4168e384213a052e6ee77723b765165b866ac52a10394dfa8f7de5b203", [:mix], [{:earmark, "~> 0.1.17 or ~> 0.2", [hex: :earmark, optional: true]}]}}

0 comments on commit ac4bca4

Please sign in to comment.