Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
/ rtab Public archive

A command-line tool for generating tables from CSV.

License

Notifications You must be signed in to change notification settings

selenebun/rtab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtab

A command-line tool for generating tables from CSV.

Examples

All of the below examples will use the following CSV file as input.

,Labial,Alveolar,Dorsal
Plosive,p,t,k
Nasal,m,n,
Fricative,,s,
Approximant,w,l,j

The basic style can be specified with the --style option, defaulting to basic.

$ rtab input.csv
            Labial Alveolar Dorsal
Plosive     p      t        k
Nasal       m      n
Fricative          s
Approximant w      l        j

$ rtab input.csv --style fancy
┌─────────────┬────────┬──────────┬────────┐
│             │ Labial │ Alveolar │ Dorsal │
│ Plosive     │ p      │ t        │ k      │
│ Nasal       │ m      │ n        │        │
│ Fricative   │        │ s        │        │
│ Approximant │ w      │ l        │ j      │
└─────────────┴────────┴──────────┴────────┘

Additional spacing can be added with the --spaces (or -s) option.

$ rtab input.csv -s2
             Labial  Alveolar  Dorsal
Plosive      p       t         k
Nasal        m       n
Fricative            s
Approximant  w       l         j

The --spaces option works similarly for the fancy style.

The fancy style can be further customized with the --headers and --separators flags.

$ rtab input.csv --style fancy --headers
┌─────────────┬────────┬──────────┬────────┐
│             │ Labial │ Alveolar │ Dorsal │
├─────────────┼────────┼──────────┼────────┤
│ Plosive     │ p      │ t        │ k      │
│ Nasal       │ m      │ n        │        │
│ Fricative   │        │ s        │        │
│ Approximant │ w      │ l        │ j      │
└─────────────┴────────┴──────────┴────────┘

$ rtab input.csv --style fancy --separators
┌─────────────┬────────┬──────────┬────────┐
│             │ Labial │ Alveolar │ Dorsal │
├─────────────┼────────┼──────────┼────────┤
│ Plosive     │ p      │ t        │ k      │
├─────────────┼────────┼──────────┼────────┤
│ Nasal       │ m      │ n        │        │
├─────────────┼────────┼──────────┼────────┤
│ Fricative   │        │ s        │        │
├─────────────┼────────┼──────────┼────────┤
│ Approximant │ w      │ l        │ j      │
└─────────────┴────────┴──────────┴────────┘

About

A command-line tool for generating tables from CSV.

Topics

Resources

License

Stars

Watchers

Forks

Languages