1CSV2YAPET(1) User Commands CSV2YAPET(1)
2
3
4
6 csv2yapet - convert CSV file to YAPET file
7
9 csv2yapet [[-c] | [-h] | [-V]] [-p {password}] [-q] [-s {separator}]
10 {src} {dst}
11
13 The csv2yapet utility converts a CSV file src to an YAPET file dst. The
14 expected columns and column order of the CSV file is explained in the
15 section called “Source File Format”.
16
17 For each successfully imported source file record a corresponding YAPET
18 password record will be generated in the resulting file.
19
20 After the successful conversion the file dst can be opened with
21 yapet(1).
22
23 The file suffix .pet is appended to the output file dst if not provided
24 as part of the file path.
25
26 The password either entered on the standard input or provided as
27 command line argument using the -p option is used to encrypt the
28 destination file dst and must be used to decrypt the file content when
29 opening the file in yapet(1).
30
31 csv2yapet will not overwrite existing destination files. If the
32 destination file already exists csv2yapet will abort the conversion.
33
34 Errors during the conversion process will be displayed unless the -q
35 option is provided.
36
37 Source File Format
38 The source file src to be converted has to be organized as CSV file.
39 The default character for delimiting the fields is ´,´ (comma) unless
40 specified differently on the command line providing the -s option
41 (refer to the section called “OPTIONS”).
42
43 Fields containing the field separator character have to be enclosed in
44 double quotes (").
45
46 Double quote characters to be converted literally, has each to be
47 preceded by another double quote character (see the section called
48 “EXAMPLES”).
49
50 The following table will describe the fields of the source CSV file as
51 expected by csv2yapet:
52
53 Table 1. Source file format
54 ┌─────────────────────────────┬────────────────────────────────────────┐
55 │ Column # │ YAPET record field │
56 ├─────────────────────────────┼────────────────────────────────────────┤
57 │ 1 │ Name │
58 ├─────────────────────────────┼────────────────────────────────────────┤
59 │ 2 │ Host │
60 ├─────────────────────────────┼────────────────────────────────────────┤
61 │ 3 │ Username │
62 ├─────────────────────────────┼────────────────────────────────────────┤
63 │ 4 │ Password │
64 ├─────────────────────────────┼────────────────────────────────────────┤
65 │ 5 │ Comment │
66 └─────────────────────────────┴────────────────────────────────────────┘
67
68 See the section called “EXAMPLES” for an example CSV file.
69
71 The following options are supported:
72
73 -c, --copyright
74 Show the copyright information.
75
76 -h, --help
77 Print a help text.
78
79 -p password, --password password
80 The password to be used to encrypt the YAPET file. If csv2yapet is
81 invoked without this option, it will prompt for the password on the
82 standard input.
83
84 -q, --quiet
85 Enable the quiet mode. No details about errors are reported.
86
87 -s separator, --separator separator
88 Change the default field separator ´,´ (comma) to the single
89 character separator.
90
91 -V, --version
92 Show the version of csv2yapet.
93
95 The following operands are required:
96
97 src
98 The source CSV file to be converted. It must be of the format
99 described in the section called “Source File Format”.
100
101 dst
102 The resulting YAPET file holding the content of src encrypted. This
103 file must not exist prior the conversion process, else csv2yapet
104 will not start the conversion and abort.
105
107 Example 1. An example of a CSV file accepted by csv2yapet.
108
109 The following example shows an excerpt of a CSV file as accepted for
110 conversion by csv2yapet.
111
112 As the second line shows, fields can be blank but the separator may not
113 be omitted.
114
115 ssh host,host.example.org,johndoe,secret,Linux machine
116 mail account,imap.email.org,john_doe,secret,
117 ...
118
119 Example 2. An example of a CSV file accepted by csv2yapet using double
120 quotes.
121
122 The following example shows an excerpt of a CSV file as accepted for
123 conversion by csv2yapet.
124
125 The first line demonstrates how to double quote fields containing the
126 separator character. The second line shows how to literally convert
127 double quote characters.
128
129 "ssh, ftp, and http server",server.example.org,johndoe,secret,Linux machine
130 mail account,imap.email.org,john_doe,secret,"John ""the Unknown"" Doe"
131 ...
132
133 Example 3. Invoking csv2yapet.
134
135 The following example shows how to invoke csv2yapet in order to convert
136 a CSV file to an YAPET file. If the -s option is not given, csv2yapet
137 will ask for a password as shown:
138
139 $ csv2yapet passwords.csv passwords.pet
140 Please enter the password for passwords.pet:
141 Please re-type the password:
142
143 passwords.pet successfully created.
144 $
145
147 0
148 No error.
149
150 1
151 Wrong command line arguments provided.
152
153 2
154 The passwords provided on the standard input do not match.
155
156 3
157 The destination file dst already exists.
158
159 4
160 An unexpected error occurred.
161
163 Please report bugs to the author (see the section called “AUTHOR”), or
164 (preferably) point your browser to http://bugs.guengel.ch[1] and create
165 a bug report.
166
168 Rafael Ostertag rafi@guengel.ch
169
171 yapet(1)
172
174 csv2yapet is part of YAPET.
175
176 YAPET -- Yet Another Password Encryption Tool
177
178 Copyright (C) 2008, 2009 Rafael Ostertag rafi@guengel.ch
179
180 This program is free software: you can redistribute it and/or modify it
181 under the terms of the GNU General Public License as published by the
182 Free Software Foundation, either version 3 of the License, or (at your
183 option) any later version.
184
185 This program is distributed in the hope that it will be useful, but
186 WITHOUT ANY WARRANTY; without even the implied warranty of
187 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
188 General Public License for more details.
189
190 You should have received a copy of the GNU General Public License along
191 with this program. If not, see http://www.gnu.org/licenses/.
192
193 Additional permission under GNU GPL version 3 section 7. If you modify
194 this program, or any covered work, by linking or combining it with the
195 OpenSSL project´s OpenSSL library (or a modified version of that
196 library), containing parts covered by the terms of the OpenSSL or
197 SSLeay licenses, Rafael Ostertag grants you additional permission to
198 convey the resulting work. Corresponding Source for a non-source form
199 of such a combination shall include the source code for the parts of
200 OpenSSL used as well as that of the covered work.
201
203 Copyright © 2008, 2009 Rafael Ostertag <rafi@guengel.ch>
204
206 1. http://bugs.guengel.ch
207 http://bugs.guengel.ch/
208
209
210
211csv2yapet 0.6 09/04/2009 CSV2YAPET(1)