tablib 0.1.0
Tablib
Parse 2d tabular data bettwen YAML, JSON, CSV.
Installation
Mac
brew tap weaming/tap
brew install tabular
Manual
git clone https://github.com/weaming/tablib
crystal build --release src/tabular.cr
mv tabular /usr/local/bin
Usage
$ ./tabular --help
tabular -- Convert between CSV, JSON, YAML. The JSON is the bridge betwwen CSV and YAML.
Usage:
tabular [options] [arguments] ...
Options:
-f FILE, --file=FILE The file [type:String] [default:"/dev/stdin"]
-t TYPE, --type Allow CSV or YAML [type:String] [default:"YAML"]
-i, --indent Option description. [type:Int32] [default:2]
--help Show this help.
--version Show version.
Interact with VIM
Add to your .vimrc
" brew install tabular
nnoremap <a-l> :%!tabular -f /dev/stdin -t yaml<CR>
nnoremap <a-c> :%!tabular -f /dev/stdin -t csv<CR>
Development
git clone
shards install
crystal run src/tabular.cr -- -f test.json -t csv
Contributing
- Fork it (https://github.com/weaming/tablib/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- weaming weaming - creator, maintainer
TODO
- JSON output custom indent
Repository
tablib
Owner
Statistic
- 1
- 1
- 1
- 0
- 1
- over 5 years ago
- November 8, 2018
License
MIT License
Links
Synced at
Fri, 22 Nov 2024 14:03:09 GMT
Languages