1CSV2YAPET(1) CSV2YAPET 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 Convert a CSV file src to an YAPET file dst. The default character for
14 delimiting the fields is ',' (comma) unless specified otherwise on the
15 command line by providing the -s.
16
17 Fields containing the field separator character have to be enclosed in
18 double quotes (").
19
20 In order to convert a double quote character it has to be preceded by
21 another double quote character.
22
23 The following table describes the fields of the source CSV file as
24 expected by csv2yapet:
25
26 Table 1. Source File Format
27 ┌─────────┬────────────────────┬─────────────────┐
28 │ │ │ │
29 │Column # │ YAPET Record Field │ Maximum size in │
30 │ │ │ bytes │
31 ├─────────┼────────────────────┼─────────────────┤
32 │ │ │ │
33 │1 │ Record Name │ 127 │
34 ├─────────┼────────────────────┼─────────────────┤
35 │ │ │ │
36 │2 │ Host Name │ 255 │
37 ├─────────┼────────────────────┼─────────────────┤
38 │ │ │ │
39 │3 │ User Name │ 255 │
40 ├─────────┼────────────────────┼─────────────────┤
41 │ │ │ │
42 │4 │ Password │ 255 │
43 ├─────────┼────────────────────┼─────────────────┤
44 │ │ │ │
45 │5 │ Comment │ 511 │
46 └─────────┴────────────────────┴─────────────────┘
47
49 The following options are supported:
50
51 -c
52 Show copyright.
53
54 -h
55 Show help.
56
57 -V
58 Show version.
59
60 -p password
61 The password to be used to encrypt the YAPET file. If csv2yapetis
62 invoked without this option, it will prompt for the password on the
63 standard input.
64
65 -q
66 Enable the quiet mode. No details about errors are reported.
67
68 -s separator
69 Change the default field separator ',' (comma) to the single
70 character separator.
71
72 src
73 The source CSV file to be converted.
74
75 dst
76 The resulting YAPET file holding the content of src encrypted.
77 This file must not exist prior to the conversion process, else
78 csv2yapet will not start the conversion and abort.
79
82 The following example shows an excerpt of a CSV file as accepted for
83 conversion by csv2yapet.
84
85 As the second line shows, fields can be blank but the separator may not
86 be omitted.
87
88 ssh host,host.example.org,johndoe,secret,Linux machine
89 mail account,imap.email.org,john_doe,secret,
90
91 An example of a CSV file accepted by csv2yapet using double quotes.
92 The following example shows an excerpt of a CSV file as accepted for
93 conversion by csv2yapet.
94
95 The first line demonstrates how to double quote fields containing the
96 separator character. The second line shows how to literally convert
97 double quote characters.
98
99 "ssh, ftp, and http server",server.example.org,johndoe,secret,Linux machine
100 mail account,imap.email.org,john_doe,secret,"John ""the Unknown"" Doe"
101
103 0
104 No error.
105
106 1
107 Error while parsing command line argument.
108
109 2
110 The passwords provided on the standard input do not match.
111
112 3
113 The destination file dst already exists.
114
115 4
116 An unexpected error occurred.
117
119 Please report bugs to https://github.com/RafaelOstertag/yapet/issues.
120
122 Rafael Ostertag rafi@guengel.ch.
123
125 yapet(1), yapet2csv(1)
126
127
128
129YAPET 2.3 2019-02-19 CSV2YAPET(1)