doc: Document decryption support in pspp-convert.
[pspp] / doc / pspp-convert.texi
1 @node Invoking pspp-convert
2 @chapter Invoking @command{pspp-convert}
3 @cindex Invocation
4 @cindex @command{pspp-convert}
5
6 @command{pspp-convert} is a command-line utility accompanying
7 @pspp{}. It reads an SPSS system or portable file @var{input} and
8 writes a copy of it to another @var{output} in a different format.
9 Synopsis:
10
11 @display
12 @t{pspp-convert} [@var{options}] @var{input} @var{output}
13
14 @t{pspp-convert -@w{-}help}
15
16 @t{pspp-convert -@w{-}version}
17 @end display
18
19 The format of @var{input} is automatically detected, when possible.
20 The character encoding of old SPSS system files cannot always be
21 guessed correctly, and SPSS/PC+ system files do not include any
22 indication of their encoding.  Use @code{-e @var{encoding}} to specify
23 the encoding in this case.
24
25 By default, the intended format for @var{output} is inferred based on its
26 extension:
27
28 @table @code
29 @item csv
30 @itemx txt
31 Comma-separated value.  Each value is formatted according to its
32 variable's print format.  The first line in the file contains variable
33 names.
34
35 @item sav
36 @item sys
37 SPSS system file.
38
39 @item por
40 SPSS portable file.
41 @end table
42
43 As a special case of format conversion, @command{pspp-convert} can
44 decrypt an encrypted SPSS system file.  Specify the encrypted file as
45 @var{input}.  The output will be the equivalent plaintext SPSS system
46 file.  You will be prompted for the password (or use @option{-p},
47 documented below).
48
49 Use @code{-O @var{extension}} to override the inferred format or to
50 specify the format for unrecognized extensions.
51
52 The following options are accepted:
53
54 @table @option
55 @item -O @var{format}
56 @itemx --output-format=@var{format}
57 Specifies the desired output format.  @var{format} must be one of the
58 extensions listed above, e.g. @code{-O csv} requests comma-separated
59 value output.
60
61 @item -c @var{maxcases}
62 @itemx --cases=@var{maxcases}
63 By default, all cases are copied from @var{input} to @var{output}.
64 Specifying this option to limit the number of cases written to
65 @var{output} to @var{maxcases}.
66
67 @item -e @var{charset}
68 @itemx --encoding=@var{charset}
69 Overrides the encoding in which character strings in @var{input} are
70 interpreted.  This option is necessary because old SPSS system files,
71 and SPSS/PC+ system files, do not self-identify their encoding.
72
73 @item -p @var{password}
74 @item --password=@var{password}
75 Specifies the password to use to decrypt an encrypted SPSS system
76 file.  If this option is not specified, @command{pspp-convert} will
77 prompt interactively for the password as necessary.
78
79 Be aware that command-line options, including passwords, may be
80 visible to other users on multiuser systems.
81
82 @item -h
83 @itemx --help
84 Prints a usage message on stdout and exits.
85
86 @item -v
87 @itemx --version
88 Prints version information on stdout and exits.
89 @end table