nebula

Small library for colored (ANSI) output in Erlang/Elixir/LFE. It's can be useful when you need to create a user-friendly command-line applications.

Github星跟蹤圖

Nebula

Build Status
BSD

Nebula is a small library for colored (ANSI) output in Erlang/Elixir. It's can be useful when you need to create a user-friendly command-line application.

Installation

Just add {nebula, "0.1.1"} to your rebar.config file and run following command:

➜ ~ make compile

or if you want to use this package with Elixir add {:nebula, "~> 0.1.1"} to your mix.exs and run following command:

➜ ~ mix deps.get

Usage

Using with Erlang:

update_something() ->
  %% ...
  %% ...
  nebula:print(green, "Something has been updated successfully!").

Using with LFE (Lisp Flavoured Erlang):

(defun update_something ()
    (nebula:print :GREEN "Something has been updated successfully!"))

Using with Elixir:

def update_something do
  # ...
  # ...
  :nebula.print(:green, "Something has been updated successfully!")
end

Available functions and colors

First argument is color name (atom), second - your message.

  • print/2: black, red, green, orange, blue, purple, yellow, cyan, grey.
  • background/2: black, red, green, yellow, blue, purple, cyan.

License

BSD 3-Clause License

主要指標

概覽
名稱與所有者lk-geimfari/nebula
主編程語言Erlang
編程語言Erlang (語言數: 2)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2016-08-24 13:06:35
推送於2021-04-30 07:23:05
最后一次提交2021-04-30 10:23:04
發布數0
用户参与
星數54
關注者數4
派生數2
提交數108
已啟用問題?
問題數3
打開的問題數0
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?