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