https://github.com/lukakerr/mdtg
Quickly generate markdown tables in your terminal using a simplistic specification
https://github.com/lukakerr/mdtg
command-line-tool markdown markdown-table
Last synced: about 1 year ago
JSON representation
Quickly generate markdown tables in your terminal using a simplistic specification
- Host: GitHub
- URL: https://github.com/lukakerr/mdtg
- Owner: lukakerr
- License: mit
- Created: 2019-05-24T10:52:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T00:49:49.000Z (over 6 years ago)
- Last Synced: 2025-03-21T18:21:16.342Z (about 1 year ago)
- Topics: command-line-tool, markdown, markdown-table
- Language: Rust
- Homepage: https://crates.io/crates/mdtg
- Size: 15.6 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Markdown Table Generator `mdtg`
[](https://crates.io/crates/mdtg)
Quickly generate markdown tables in your terminal using a simplistic specification.
### Installation
#### `crates.io`
```bash
$ cargo install mdtg
```
#### Manual
```bash
$ git clone https://github.com/lukakerr/mdtg.git
$ cargo run
```
### Usage
```bash
# Create a 4 by 4 table, without spaces in argument
$ mdtg 4x4
| | | | |
| ------ | ------ | ------ | ------ |
| | | | |
| | | | |
| | | | |
| | | | |
# Create a 3 by 5 table, with left, center and right aligned columns
$ mdtg "3lcr x 5"
| | | |
| ------ |:------:| ------:|
| | | |
| | | |
| | | |
| | | |
| | | |
```
### BNF Grammar
```
Table -> Column Cross Row
Column -> Num Positions
Row -> Num
Num -> Digit | Digit Num
Digit -> [0-9]
Cross -> "x"
Positions -> Position | Position Positions
Position -> "l" | "r" | "c"
```