0.4.0 • Published 6 years ago

aboxd v0.4.0

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

aboxd

Build Status npm version

Turn comma-separated strings to ascii-charts. Try it live here

img

Examples

npx aboxd 'left,right' will yield:

┌──────┐   ┌───────┐
│ left │───│ right │
└──────┘   └───────┘

npx aboxd $',top\nbottom-left,bottom-right' will yield:

                  ┌──────────────┐
                  │     top      │
                  └──────────────┘
                         │        
┌─────────────┐   ┌──────────────┐
│ bottom-left │───│ bottom-right │
└─────────────┘   └──────────────┘

Use a dot(".") to connect boxes without text:

npx aboxd $'.,top\nbottom-left,bottom-right' will yield:

                  ┌──────────────┐
       ┌──────────│     top      │
       │          └──────────────┘
       │                 │        
┌─────────────┐   ┌──────────────┐
│ bottom-left │───│ bottom-right │
└─────────────┘   └──────────────┘

From files

aboxd will read from stdin if no arguments are given

Given a file:

,Sky
Sweden,Norway
Subway,.

cat file | npx aboxd

             ┌────────┐
             │  Sky   │
             └────────┘
                 │     
┌────────┐   ┌────────┐
│ Sweden │───│ Norway │
└────────┘   └────────┘
    │            │     
┌────────┐       │     
│ Subway │───────┘     
└────────┘             

Vim plugin

Plugin is a stretch, but add this to .vimrc to trigger aboxd on the current selection with <leader>a:

vnoremap <leader>a :!npx aboxd<CR>

LICENSE

MIT Copyright Daniel Lundin

0.4.0

6 years ago

0.4.0-beta.1

6 years ago

0.3.0

6 years ago

0.3.0-beta.2

6 years ago

0.3.0-beta.1

6 years ago

0.3.0-beta.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.1.0-beta.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago