peek

peek

Take a peek at tab-delimited files

Usage

peek <file.tsv> [buffer]

Functions

Name Description
justify Calculates the spacing for justifying to the right
main Run the CLI.
max_string Given a list of strings, finds the maximum strign length
pargs Basic command-line parser
peek Peek at the input data.
pprint Re-formats first two lines on file so columns are left justified and values are right justified
print_header Print filenames and divider
usage Print usage information and exit program

justify

peek.justify(h, d, n, nr)

Calculates the spacing for justifying to the right

main

peek.main()

Run the CLI.

max_string

peek.max_string(data)

Given a list of strings, finds the maximum strign length

pargs

peek.pargs()

Basic command-line parser

peek

peek.peek(filename, buffer, delim='\t')

Peek at the input data.

pprint

peek.pprint(headlist, data, linelength, fn)

Re-formats first two lines on file so columns are left justified and values are right justified

print_header

peek.print_header(filename, length)

Print filenames and divider

usage

peek.usage()

Print usage information and exit program