'\" t .\" Title: csv2yapet .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 02/23/2014 .\" Manual: User Commands .\" Source: csv2yapet 1.0 .\" Language: English .\" .TH "CSV2YAPET" "1" "02/23/2014" "csv2yapet 1\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" csv2yapet \- convert CSV file to YAPET file .SH "SYNOPSIS" .ad l .HP \w'\fBcsv2yapet\fR\ 'u \fBcsv2yapet\fR [[\fB\-c\fR] | [\fB\-h\fR] | [\fB\-V\fR]] [\fB\-p\fR\ {\fIpassword\fR}] [\fB\-q\fR] [\fB\-s\fR\ {\fIseparator\fR}] {\fIsrc\fR} {\fIdst\fR} .ad .SH "DESCRIPTION" .PP Convert a CSV file \fIsrc\fR to an YAPET file \fIdst\fR\&. The default character for delimiting the fields is \',\' (comma) unless specified otherwise on the command line by providing the \fB\-s\fR option (refer to the section called \(lqOPTIONS\(rq)\&. .PP Fields containing the field separator character have to be enclosed in double quotes (")\&. .PP In order to convert a double quote character it has to be preceded by another double quote character (see the section called \(lqEXAMPLES\(rq)\&. .PP The following table describes the fields of the source CSV file as expected by \fBcsv2yapet\fR: .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&1.\ \&Source file format .TS allbox expand tab(:); cB lB lB. T{ Column # T}:T{ YAPET Record Field T}:T{ Maximum size in bytes T} .T& c l l c l l c l l c l l c l l. T{ 1 T}:T{ Record Name T}:T{ 127 T} T{ 2 T}:T{ Host Name T}:T{ 255 T} T{ 3 T}:T{ User Name T}:T{ 255 T} T{ 4 T}:T{ Password T}:T{ 255 T} T{ 5 T}:T{ Comment T}:T{ 511 T} .TE .sp 1 .PP See the section called \(lqEXAMPLES\(rq for an example CSV file\&. .SH "OPTIONS" .PP The following options are supported: .PP \fB\-c\fR .RS 4 Show copyright\&. .RE .PP \fB\-h\fR .RS 4 Show help\&. .RE .PP \fB\-V\fR .RS 4 Show version\&. .RE .PP \fB\-p\fR \fIpassword\fR .RS 4 The password to be used to encrypt the YAPET file\&. If \fBcsv2yapet\fR is invoked without this option, it will prompt for the password on the standard input\&. .RE .PP \fB\-q\fR .RS 4 Enable the quiet mode\&. No details about errors are reported\&. .RE .PP \fB\-s\fR \fIseparator\fR .RS 4 Change the default field separator \',\' (comma) to the single character \fIseparator\fR\&. .RE .SH "OPERANDS" .PP The following operands are required: .PP \fIsrc\fR .RS 4 The source CSV file to be converted\&. It must be of the format described in Table\ \&1, \(lqSource file format\(rq\&. .RE .PP \fIdst\fR .RS 4 The resulting YAPET file holding the content of \fIsrc\fR encrypted\&. This file must not exist prior to the conversion process, else \fBcsv2yapet\fR will not start the conversion and abort\&. .RE .SH "EXAMPLES" .PP \fBExample\ \&1.\ \&An example of a CSV file accepted by csv2yapet.\fR .PP The following example shows an excerpt of a CSV file as accepted for conversion by \fBcsv2yapet\fR\&. .PP As the second line shows, fields can be blank but the separator may not be omitted\&. .sp .if n \{\ .RS 4 .\} .nf ssh host,host\&.example\&.org,johndoe,secret,Linux machine mail account,imap\&.email\&.org,john_doe,secret, \&... .fi .if n \{\ .RE .\} .PP \fBExample\ \&2.\ \&An example of a CSV file accepted by csv2yapet using double quotes.\fR .PP The following example shows an excerpt of a CSV file as accepted for conversion by \fBcsv2yapet\fR\&. .PP The first line demonstrates how to double quote fields containing the separator character\&. The second line shows how to literally convert double quote characters\&. .sp .if n \{\ .RS 4 .\} .nf "ssh, ftp, and http server",server\&.example\&.org,johndoe,secret,Linux machine mail account,imap\&.email\&.org,john_doe,secret,"John ""the Unknown"" Doe" \&... .fi .if n \{\ .RE .\} .PP \fBExample\ \&3.\ \&Invoking csv2yapet.\fR .PP The following example shows how to invoke \fBcsv2yapet\fR in order to convert a CSV file to an YAPET file\&. If the \fB\-s\fR option is not given, \fBcsv2yapet\fR will ask for a password as shown: .sp .if n \{\ .RS 4 .\} .nf $ \fBcsv2yapet\fR passwords\&.csv passwords\&.pet Please enter the password for passwords\&.pet: Please re\-type the password: passwords\&.pet successfully created\&. $ .fi .if n \{\ .RE .\} .SH "EXIT STATUS" .PP .PP 0 .RS 4 No error\&. .RE .PP 1 .RS 4 Error while parsing command line argument\&. .RE .PP 2 .RS 4 The passwords provided on the standard input do not match\&. .RE .PP 3 .RS 4 The destination file \fIdst\fR already exists\&. .RE .PP 4 .RS 4 An unexpected error occurred\&. .RE .SH "BUGS" .PP Please report bugs to \m[blue]\fBhttp://bugs\&.guengel\&.ch/\fR\m[]\&. .SH "AUTHOR" .sp Rafael Ostertag rafi@guengel\&.ch .SH "SEE ALSO" .sp \fByapet\fR(1), \fByapet2csv\fR(1) .SH "COPYRIGHT" .br Copyright \(co 2008, 2009, 2010, 2011, 2013, 2014 Rafael Ostertag .br