Coder Social home page Coder Social logo

lk-geimfari / nebula Goto Github PK

View Code? Open in Web Editor NEW
53.0 5.0 2.0 2.39 MB

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

License: BSD 3-Clause "New" or "Revised" License

Erlang 75.99% Makefile 24.01%
erlang ansi colored output cli elixir lfe beam colors

nebula's Introduction

Nebula

test BSD

Nebula is a small library for colored (ANSI) output in Erlang/Elixir. It's can be useful when you need to create 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

nebula's People

Contributors

lk-geimfari avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

wahello chmodawk

nebula's Issues

Add eunit tests

TODO:

  • add eunit or common tests
  • add tests runner for Travis CI

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.