https://github.com/kpanic/elbat
ascii tables for cli
https://github.com/kpanic/elbat
Last synced: 7 months ago
JSON representation
ascii tables for cli
- Host: GitHub
- URL: https://github.com/kpanic/elbat
- Owner: kpanic
- Fork: true (zweifisch/table)
- Created: 2018-05-11T19:32:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-02T14:25:45.000Z (over 7 years ago)
- Last Synced: 2025-10-18T19:54:33.757Z (7 months ago)
- Language: Elixir
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elbat (formerly known as Table)
This is a fork (*with renaming) of the Table package since upstream seems unmaintaned
The main purpose of `Elbat` is to be able to calculate tabular output also when
having html tags.
If you don't need this small feature, please use the official `Table` package.
[![hex][hex-image]][hex-url]
ascii tables for cli
## Installation
First, add `elbat` to your dependencies in `mix.exs`:
def deps do
[{:elbat, "~> 0.0.1"}]
end
Then, update your dependencies:
$ mix deps.get
## Usage
iex> IO.write Elbat.table(%{"key"=> "value"})
+-----|-------+
| key | value |
+-----|-------+
iex> IO.write Elbat.table([%{"style"=> :ascii},
%{"style"=> :unicode}], :unicode)
┌──────────┐
│ style │
├──────────┤
│ :ascii │
│ :unicode │
└──────────┘
iex> IO.write Elbat.table(%{"key"=> "multiline\nvalue"}, :unicode)
┌─────┬───────────┐
│ key ╎ multiline │
│ ╎ value │
└─────┴───────────┘
[hex-image]: https://img.shields.io/hexpm/v/elbat.svg?style=flat
[hex-url]: https://hex.pm/packages/elbat