pspp-convert: Add --labels and --recode options.
[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 .SS "Input Selection Options"
84 The \fBdir\fR and \fBconvert\fR commands, by default, operate on all
85 of the objects in the source SPV file, except for objects that are not
86 visible in the output viewer window.  The user may specify these
87 options to select a subset of the input objects.  When multiple
88 options are used, only objects that satisfy all of them are selected:
89 .IP "\fB\-\-select=\fR[\fB^\fR]\fIclass\fR..."
90 Include only objects of the given \fIclass\fR; with leading \fB^\fR,
91 include only objects not in the class.  Use commas to separate
92 multiple classes.  The supported classes are:
93 .RS
94 .IP
95 \fBcharts headings logs models tables texts trees warnings
96 outlineheaders pagetitle notes unknown other\fR
97 .RE
98 .IP
99 Use \fB\-\-select=help\fR to print this list of classes.
100 .IP "\-\-commands=\fR[\fB^\fR]\fIcommand\fR..."
101 .IQ "\-\-subtypes=\fR[\fB^\fR]\fIsubtype\fR..."
102 .IQ "\-\-labels=\fR[\fB^\fR]\fIlabel\fR..."
103 Include only objects with the specified \fIcommand\fR, \fIsubtype\fR,
104 or \fIlabel\fR.  With a leading \fB^\fR, include only the objects
105 that do not match.  Multiple values may be specified separated by
106 commas.  An asterisk at the end of a value acts as a wildcard.
107 .IP
108 The \fB\-\-command\fR option matches command identifiers, case
109 insensitively.  All of the objects produced by a single command use
110 the same, unique command identifier.  Command identifiers are always
111 in English regardless of the language used for output.  They often
112 differ from the command name in PSPP syntax.  Use the
113 \fBpspp\-output\fR program's \fBdir\fR command to print command
114 identifiers in particular output.
115 .IP
116 The \fB\-\-subtypes\fR option matches particular tables within a
117 command, case insensitively.  Subtypes are not necessarily unique: two
118 commands that produce similar output tables may use the same subtype.
119 Subtypes are always in English and \fBdir\fR will print them.
120 .IP
121 The \fB\-\-labels\fR option matches the labels in table output (that
122 is, the table titles).  Labels are affected by the output language,
123 variable names and labels, split file settings, and other factors.
124 .IP "\fB\-\-instances=\fIinstance\fR..."
125 Include the specified \fIinstance\fR of an object that matches the
126 other criteria within a single command.  The \fIinstance\fR may be a
127 number (1 for the first instance, 2 for the second, and so on) or
128 \fBlast\fR for the last instance.
129 .IP "\fB\-\-show\-hidden"
130 Include hidden output objects in the output.  By default, they are
131 excluded.
132 .IP "\fB\-\-or\fR"
133 Separates two sets of selection options.  Objects selected by either
134 set of options are included in the output.
135 .PP
136 The following additional input selection options are intended mainly
137 for use by PSPP developers:
138 .IP "\fB\-\-errors\fR"
139 Include only objects that cause an error when read.  With the
140 \fBconvert\fR command, this is most useful in conjunction with the
141 \fB\-\-force\fR option.
142 .IP "\fB\-\-members=\fImember\fR..."
143 Include only the objects that include a listed Zip file \fImember\fR.
144 More than one name may be included, comma-separated.  The members in
145 an SPV file may be listed with the \fBdir\fR command by adding the
146 \fB\-\-show\-members\fR option or with the \fBzipinfo\fR program
147 included with many operating systems.  Error messages that
148 \fBpspp\-output\fR prints when it reads SPV files also often include
149 member names.
150 .IP "\fB\-\-member\-names\fR"
151 Displays the name of the Zip member or members associated with each
152 object just above the object itself.
153 .SH "OPTIONS"
154 .IP "\fB\-h\fR"
155 .IQ "\fB\-\-help\fR"
156 Prints a usage message on stdout and exits.
157 .
158 .IP "\fB\-v\fR"
159 .IQ "\fB\-\-version\fR"
160 Prints version information on stdout and exits.
161 .
162 .SH "AUTHORS"
163 Ben Pfaff.
164 .
165 .SH "SEE ALSO"
166 .
167 .BR pspp\-convert (1),
168 .BR pspp (1),
169 .BR psppire (1).