Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomgco/elixir-charm
ANSI rainbow for elixir, be a magician
https://github.com/tomgco/elixir-charm
Last synced: 12 days ago
JSON representation
ANSI rainbow for elixir, be a magician
- Host: GitHub
- URL: https://github.com/tomgco/elixir-charm
- Owner: tomgco
- Created: 2014-10-07T21:30:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-29T13:00:56.000Z (about 10 years ago)
- Last Synced: 2025-01-02T13:46:20.245Z (23 days ago)
- Language: Elixir
- Size: 137 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Use ANSI terminal characters to write colors and cursor positions. (Miscellaneous)
- fucking-awesome-elixir - charm - Use ANSI terminal characters to write colors and cursor positions. (Miscellaneous)
- awesome-elixir - charm - Use ANSI terminal characters to write colors and cursor positions. (Miscellaneous)
README
Charm [UNDER HEAVY DEVELOPMENT]
=====Use
[ansi terminal characters](http://www.termsys.demon.co.uk/vtansi.htm)
to write colors and cursor positions.Port from [@substack](https://www.github.com/substack)
Example
=======```elixr
```
Charm.reset\0
-------------Reset the entire screen, like the /usr/bin/reset command.
Charm.write\1
----------------`Charm.write "Nom nom nom"`
Pass along `msg` to the output stream.
Charm.position\2
--------------------Set the cursor position to the absolute coordinates `x, y`.
Charm.display\1
-------------------`Charm.display :bright`
Set the display mode with the atom defined in `IO.ANSI`.
Charm.foreground\1
-----------------------`Charm.foreground :blue`
Set the foreground color with the atom `:color`, which can be:
* :red
* :yellow
* :green
* :blue
* :cyan
* :magenta
* :black
* :whiteCharm.background\1
-----------------------`Charm.background :red`
Set the background color with the atom `:color`, which can be:
* :red
* :yellow
* :green
* :blue
* :cyan
* :magenta
* :black
* :whiteCharm.cursor\1
---------------------Set the cursor visibility with a boolean.
`Charm.cursor true`
install
=======With [hex](http://hex.pm) do:
```
```