Add support for reading and writing SPV files.
[pspp] / utilities / pspp-convert.1
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH pspp\-convert 1 "October 2013" "PSPP" "PSPP Manual"
8 .
9 .SH NAME
10 pspp\-convert \- convert SPSS files to other formats
11 .
12 .SH SYNOPSIS
13 \fBpspp\-convert\fR [\fIoptions\fR] \fIinput\fR \fIoutput\fR
14 .br
15 \fBpspp\-convert \-\-help\fR | \fB\-h\fR
16 .br
17 \fBpspp\-convert \-\-version\fR | \fB\-v\fR
18 .
19 .SH DESCRIPTION
20 The \fBpspp\-convert\fR program reads \fIinput\fR, which may be an
21 SPSS system file, an SPSS/PC+ system file, an SPSS portable file,
22 or an encrypted SPSS syntax file,
23 and writes it to \fIoutput\fR, performing format conversion as
24 necessary.
25 .PP
26 The format of \fIinput\fR is automatically detected, when possible.
27 The character encoding of old SPSS system files cannot always be
28 guessed correctly, and SPSS/PC+ system files do not include any
29 indication of their encoding.  Use \fB\-e \fIencoding\fR to specify
30 the encoding in this case.
31 .PP
32 By default, the intended format for \fIoutput\fR is inferred from its
33 extension:
34 .
35 .IP \fBcsv\fR
36 .IQ \fBtxt\fR
37 Comma-separated value.  Each value is formatted according to its
38 variable's print format.  The first line in the file contains variable
39 names.
40 .
41 .IP \fBsav\fR
42 .IQ \fBsys\fR
43 SPSS system file.
44 .
45 .IP \fBpor\fR
46 SPSS portable file.
47 .
48 .IP \fBsps\fR
49 SPSS syntax file.  (Only encrypted syntax files may be converted to
50 this format.)
51 .
52 .PP
53 Use \fB\-O \fIextension\fR to override the inferred format or to
54 specify the format for unrecognized extensions.
55 .
56 .PP
57 \fBpspp\-convert\fR can convert most input formats to most output
58 formats.  Encrypted system file and syntax files are exceptions: if
59 the input file is in an encrypted format, then the output file must
60 be the same format (decrypted).
61 .
62 .SH "OPTIONS"
63 .SS "General Options"
64 .
65 .IP "\fB\-O format\fR"
66 .IQ "\fB\-\-output\-format=\fIformat\fR"
67 Specifies the desired output format.  \fIformat\fR must be one of the
68 extensions listed above, e.g. \fB\-O csv\fR requests comma-separated
69 value output.
70 .
71 .IP "\fB\-c \fImaxcases\fR"
72 .IQ "\fB\-\-cases=\fImaxcases\fR"
73 By default, all cases are copied from \fIinput\fR to \fIoutput\fR.
74 Specifying this option to limit the number of cases written to
75 \fIoutput\fR to \fImaxcases\fR.
76 .
77 .IP "\fB\-e \fIcharset\fR"
78 .IQ "\fB\-\-encoding=\fIcharset\fR"
79 Overrides the encoding in which character strings in \fIinput\fR are
80 interpreted.  This option is necessary because old SPSS system files
81 do not self-identify their encoding.
82 .
83 .SS "Password Options"
84 When the input file is encrypted, \fBpspp\-convert\fR needs to obtain
85 a password to decrypt it.  To do so, the user may specify the password
86 with \f\-p\fR (or \fB\-\-password), or the name of a file containing a
87 list of possible passwords with \fB\-\-password\-list\fR, or an
88 alphabet of possible passwords to try along with a maximum length with
89 \fB\-a\fR (or \fB\-\-password\-alphabet\fR) and \fB\-l\fR (or
90 \-\-password\-length\fR).  If none of these options is used,
91 \fBpspp\-convert\fR prompts for the password.  The password options
92 are:
93 .
94 .IP "\fB\-p \fIpassword\fR"
95 .IQ "\fB\-\-password=\fIpassword\fR"
96 Specifies the password to use to decrypt the input file.
97 .
98 .IP
99 On multiuser systems, this option may not be safe because other users
100 may be able to see the password in process listings.
101 .
102 .IP "\fB\-a \fIalphabet \fB\-l \fImax-length\fR"
103 .IQ "\fB\-\-password-alphabet=\fIalphabet\ \fB\-\-password-length=\fImax-length\fR"
104 These options are an alternative to \fB\-p\fR or \fB\-\-password\fR.
105 They direct \fBpspp\-convert\fR to search for the correct password
106 from the set of all passwords of symbols from \fIalphabet\fR (which
107 may contain character ranges specified with \fB-\fR) and no more than
108 \fImax-length\fR symbols long.  For example, \fB\-a a-z \-l 5\fR
109 checks all possible lowercase alphabetic passwords no more than 5
110 characters long.
111 .IP
112 When these options are used, \fB\-p\fR may additionally specify a
113 starting point for the search.
114 .
115 .IP "\fB\-\-password\-list=\fIfile\fR"
116 Specifies a file to read containing a list of passwords to try, one
117 per line.  If \fIfile\fR is \fB\-\fR, reads from stdin.
118 .
119 .SS "Other Options"
120 .IP "\fB\-h\fR"
121 .IQ "\fB\-\-help\fR"
122 Prints a usage message on stdout and exits.
123 .
124 .IP "\fB\-v\fR"
125 .IQ "\fB\-\-version\fR"
126 Prints version information on stdout and exits.
127 .
128 .SH "AUTHORS"
129 Ben Pfaff.
130 .
131 .SH "SEE ALSO"
132 .
133 .BR pspp (1),
134 .BR psppire (1).