psv

command
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

psv command

Usage:

psv
    -h                      help
    -help
    -ignore <prefix>        ignore <prefix> before
    -squash                 squash empty columns
    -sort                   sort rows between rulers
    -by <col>[,<col>...]    sort by column(s)

PSV Tables

  • rows must begin with a '|'
  • columns must be separated by '|'
  • the first row can be used to define the column names
  • column names do not have to be unique
  • rulers provide horizontal separators
  • a row with no data is a ruler (not one of the table's data rows)
  • all

Examples

% cat input.txt
  //  | name | score
    | -
        | Adam |      1
| Alexander|2
|Bob|3

% psv -i // < input.txt > output.txt

% cat output.txt
  //  | name      | score |
  //  | --------- | ----- |
  //  | Adam      | 1     |
  //  | Alexander | 2     |
  //  | Bob       | 3     |

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL