pspp-output: New option --table-look.
[pspp] / utilities / pspp-output.1
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH pspp\-output 1 "December 2019" "PSPP" "PSPP Manual"
8 .
9 .SH NAME
10 pspp\-output \- convert and operate on SPSS viewer (SPV) files
11 .
12 .SH SYNOPSIS
13 \fBpspp\-output detect \fIfile\fR
14 .br
15 \fBpspp\-output \fR[\fIoptions\fR] \fBdir\fR \fIfile\fR
16 .br
17 \fBpspp\-output \fR[\fIoptions\fR] \fBconvert\fR \fIsource destination\fR
18 .br
19 \fBpspp\-output \-\-help\fR | \fB\-h\fR
20 .br
21 \fBpspp\-output \-\-version\fR | \fB\-v\fR
22 .
23 .SH DESCRIPTION
24 .PP
25 \fBpspp\-output\fR is a command-line utility accompanying PSPP.
26 It supports multiple operations on SPSS viewer or \fB.spv\fR files,
27 here called SPV files.  SPSS 16 and later writes SPV files to
28 represent the contents of its output editor.
29 .PP
30 SPSS 15 and earlier versions instead use \fB.spo\fR files.
31 \fBpspp\-output\fR does not support this format.
32 .PP
33 \fBpspp\-output\fR has a number of subcommands, documented separately
34 below.  \fBpspp\-output\fR also has several undocumented command forms
35 that developers may find useful for debugging.
36 .
37 .SS The \fBdetect\fR command
38 When invoked as \fBpspp\-output detect \fIfile\fR, \fBpspp\-output\fR
39 reads enough of \fIfile\fR to determine whether it is an SPV file.  If
40 so, it exits successfully without outputting anything.  When
41 \fIfile\fR is not an SPV file or if some other error occurs,
42 \fBpspp\-output\fR prints an error message and exits with a failure
43 indication.
44 .
45 .SS The \fBdir\fR command
46 When invoked as \fBpspp\-output dir \fIfile\fR, \fBpspp\-output\fR
47 prints on stdout a table of contents for SPV file \fIfile\fR.  By
48 default, this table lists every object in the file, except for hidden
49 objects.  See the \fBInput Selection Options\fR section below for
50 information on the options available to select a subset of objects.
51 .PP
52 The following additional option for \fBdir\fR is intended mainly for
53 use by PSPP developers:
54 .
55 .IP "\fB\-\-member\-names\fR"
56 Also show the names of the Zip members associated with each object.
57 .
58 .SS The \fBconvert\fR command
59 When invoked as \fBpspp\-output convert \fIsource destination\fR,
60 \fBpspp\-output\fR reads the SPV file \fIsource\fR and converts it
61 to another format, writing the output to \fIdestination\fR.
62 .PP
63 By default, \fBpspp\-output\fR infers the intended format for
64 \fIdestination\fR from its extension.  The known extensions are
65 generally: \fBcsv html list odt pdf ps spv svg txt\fR.  Use
66 \fB\-\-help\fR to see an accurate list, since a given installation
67 might be built without support for some formats.
68 .PP
69 See the \fBInput Selection Options\fR section below for information on
70 the options available to select a subset of objects to include in the
71 output.  The following additional options are accepted:
72 .IP "\fB-O format=\fIformat\fR"
73 Overrides the format inferred from the output file's extension.
74 \fIformat\fR must be one of the extensions listed above.
75 .IP "\fB-O \fIoption\fB=\fIvalue\fR"
76 Sets an option for the output file format.  Refer to the PSPP manual
77 for details of the available output options.
78 .IP \fB\-F\fR
79 .IQ \fB\-\-force\fR
80 By default, if the source is corrupt or otherwise cannot be processed,
81 the destination is not written.  These option make \fBpspp\-output\fR
82 write the output as best it can, even with errors.
83 .IP \fB\-\-table\-look=\fIfile\fR
84 Reads a table style from \fIfile\fR and applies it to all of the
85 output tables.  The file should a TableLook \fB.stt\fR file.
86 .SS "Input Selection Options"
87 The \fBdir\fR and \fBconvert\fR commands, by default, operate on all
88 of the objects in the source SPV file, except for objects that are not
89 visible in the output viewer window.  The user may specify these
90 options to select a subset of the input objects.  When multiple
91 options are used, only objects that satisfy all of them are selected:
92 .IP "\fB\-\-select=\fR[\fB^\fR]\fIclass\fR..."
93 Include only objects of the given \fIclass\fR; with leading \fB^\fR,
94 include only objects not in the class.  Use commas to separate
95 multiple classes.  The supported classes are:
96 .RS
97 .IP
98 \fBcharts headings logs models tables texts trees warnings
99 outlineheaders pagetitle notes unknown other\fR
100 .RE
101 .IP
102 Use \fB\-\-select=help\fR to print this list of classes.
103 .IP "\-\-commands=\fR[\fB^\fR]\fIcommand\fR..."
104 .IQ "\-\-subtypes=\fR[\fB^\fR]\fIsubtype\fR..."
105 .IQ "\-\-labels=\fR[\fB^\fR]\fIlabel\fR..."
106 Include only objects with the specified \fIcommand\fR, \fIsubtype\fR,
107 or \fIlabel\fR.  With a leading \fB^\fR, include only the objects
108 that do not match.  Multiple values may be specified separated by
109 commas.  An asterisk at the end of a value acts as a wildcard.
110 .IP
111 The \fB\-\-command\fR option matches command identifiers, case
112 insensitively.  All of the objects produced by a single command use
113 the same, unique command identifier.  Command identifiers are always
114 in English regardless of the language used for output.  They often
115 differ from the command name in PSPP syntax.  Use the
116 \fBpspp\-output\fR program's \fBdir\fR command to print command
117 identifiers in particular output.
118 .IP
119 The \fB\-\-subtypes\fR option matches particular tables within a
120 command, case insensitively.  Subtypes are not necessarily unique: two
121 commands that produce similar output tables may use the same subtype.
122 Subtypes are always in English and \fBdir\fR will print them.
123 .IP
124 The \fB\-\-labels\fR option matches the labels in table output (that
125 is, the table titles).  Labels are affected by the output language,
126 variable names and labels, split file settings, and other factors.
127 .IP "\-\-nth-commands=\fIn\fR..."
128 Include only objects from the \fIn\fRth command that matches
129 \fB\-\-commands\fR (or the \fIn\fRth command overall if
130 \fB\-\-commands\fR is not specified), where \fIn\fR is 1 for the first
131 command, 2 for the second, and so on.
132 .IP "\fB\-\-instances=\fIinstance\fR..."
133 Include the specified \fIinstance\fR of an object that matches the
134 other criteria within a single command.  The \fIinstance\fR may be a
135 number (1 for the first instance, 2 for the second, and so on) or
136 \fBlast\fR for the last instance.
137 .IP "\fB\-\-show\-hidden"
138 Include hidden output objects in the output.  By default, they are
139 excluded.
140 .IP "\fB\-\-or\fR"
141 Separates two sets of selection options.  Objects selected by either
142 set of options are included in the output.
143 .PP
144 The following additional input selection options are intended mainly
145 for use by PSPP developers:
146 .IP "\fB\-\-errors\fR"
147 Include only objects that cause an error when read.  With the
148 \fBconvert\fR command, this is most useful in conjunction with the
149 \fB\-\-force\fR option.
150 .IP "\fB\-\-members=\fImember\fR..."
151 Include only the objects that include a listed Zip file \fImember\fR.
152 More than one name may be included, comma-separated.  The members in
153 an SPV file may be listed with the \fBdir\fR command by adding the
154 \fB\-\-show\-members\fR option or with the \fBzipinfo\fR program
155 included with many operating systems.  Error messages that
156 \fBpspp\-output\fR prints when it reads SPV files also often include
157 member names.
158 .IP "\fB\-\-member\-names\fR"
159 Displays the name of the Zip member or members associated with each
160 object just above the object itself.
161 .SH "OPTIONS"
162 .IP "\fB\-h\fR"
163 .IQ "\fB\-\-help\fR"
164 Prints a usage message on stdout and exits.
165 .
166 .IP "\fB\-v\fR"
167 .IQ "\fB\-\-version\fR"
168 Prints version information on stdout and exits.
169 .
170 .SH "AUTHORS"
171 Ben Pfaff.
172 .
173 .SH "SEE ALSO"
174 .
175 .BR pspp\-convert (1),
176 .BR pspp (1),
177 .BR psppire (1).