File: prtable.txt

package info (click to toggle)
nosql 3.1-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,448 kB
  • ctags: 267
  • sloc: cpp: 1,028; ansic: 915; awk: 732; perl: 502; tcl: 292; sh: 289; makefile: 44
file content (129 lines) | stat: -rw-r--r-- 4,842 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# *********************************************************************
#  Original code: ptbl,v 2.7 1993/03/29 13:34:46 hobbs
#
#  Adapted to NoSQL by Carlo Strozzi <carlos@linux.it>.
#
#  prtable.txt: help text
#  Copyright (C) 2001 Carlo Strozzi <carlos@linux.it>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# *********************************************************************

                      NoSQL operator: prtable

Very experimental NoSQL table formatter for character displays.

Usage: prtable [options]

Options:
    --help (-h)
      Print this help info.

    --trunc (-T) 'n'
      Truncate field length to 'n'. The default is no truncation.
      Truncation will affect automatic datatype detection (see below).

    --debug (-x) 'c'
      Print to STDERR about automatic datatype detection on column 'c'.
      If 'c' is not specified then no debug will occur.

    --step (-S) 'N'
      Internally, the program comprises three steps. With this option
      we tell it to perform just the first 'N' steps, with N={1,2,3}

    --best=0 (-b0)
      By default, when a multi-line record of output for each row is
      necessary (due to the width of the current window or terminal)
      the program will try to fill space at the end of lines that would
      otherwise be wasted by moving some columns. This option prevents
      the moving of any columns.

    --best=N (-b[N])
      This option attempts a "best fit" by rearranging columns (widest
      columns first). If 'N' is given, the first N columns of the first
      line will not be moved.

    --big-fields (-B)
      Handle very large data fields, e.g. over 1000 chars.
      This option takes longer but it works for any size data fields.

    --fold (-f)
      Fold long data fields into multi line data based on field width.
      May be used with the '--trunc' option to limit the field width.
      Only a single line record of output is produced with this option.

    --indent=N (-iN)
      Indent size of N spaces on 2nd and later lines of a multi-line
      record of output. Default is 4 spaces.

    --line-width=N (-lN)
      Line length of N chars for output. Default is the width of
      the current window or terminal.

    --page-size=N (-pN)
      Page size is N lines. Default is the height of the current
      window or terminal.  A value of zero '-p0' will turn paging off.

    --print=X[stg] (-PX[stg])
      Page headings and settings for printing.  A two line heading is
      put onto each page: page number, current date, and an optional
      string (stg).  Sets page length (in lines) and line length (in
      chars) according to the value of 'X' as follows.
         X: P  page: 60  line:   80     (default font size)
         X: R  page: 47  line:  116     (rotated default)
         X: A  page: 51  line:  125     (rotated 10 point font)
         X: 8  page: 63  line:  144     (rotated  8 point font)
         X: 6  page: 82  line:  192     (rotated  6 point font)
         X: W  page: and line: from current window size.
      Other desired page and/or line size options may be set after
      this in the option list.

    --separator=K (-sK)
      Separator 'K' (which may be multi char) is placed between columns.
      Default is two spaces.

    --trunc=[N] (-t[N])
      Truncate data to the defined width. If N is given, the width
      of each printed field will be limited to N chars.

    --window (-w)
      List as many columns as possible in single line records that
      will fit in the current window or terminal width.

Notes:

This program is rather inefficient and it is mainly meant to be used
interactively in a terminal session.

Automatic data-type detection:

Column types/widths are inferred from the input table in an auto-
adaptive manner. Some examples of how datatypes are detected:

Value                 Type
-----                 ----
zxZZ123               String
12345                 Integer
-12345                Integer
+12345                Integer
1234,5                Float1
1234.5                Float1
-1234.5               Float1
+1234.567             Float3
0.56                  Float2
.56                   Float2

$Id$