'\" t .\" Title: csv2yapet .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.17 .\" Date: 2022-03-12 .\" Manual: CSV2YAPET .\" Source: YAPET 2.6 .\" Language: English .\" .TH "CSV2YAPET" "1" "2022-03-12" "YAPET 2.6" "CSV2YAPET" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" csv2yapet \- convert CSV file to YAPET file .SH "SYNOPSIS" .sp \fBcsv2yapet\fP [[\-c] | [\-h] | [\-V]] | [[\-p \fIpassword\fP] [\-q] [\-s \fIseparator\fP]] \fIsrc\fP \fIdst\fP .SH "DESCRIPTION" .sp Convert a CSV file \fIsrc\fP to an YAPET file \fIdst\fP. The default character for delimiting the fields is \*(Aq\fI,\fP\*(Aq (comma) unless specified otherwise on the command line by providing the \fB\-s\fP. .sp Fields containing the field separator character have to be enclosed in double quotes (\fI"\fP). .sp In order to convert a double quote character it has to be preceded by another double quote character. .sp The following table describes the fields of the source CSV file as expected by \fBcsv2yapet\fP: .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 tab(:); lt lt lt. T{ .sp Column # T}:T{ .sp YAPET Record Field T}:T{ .sp Maximum size in bytes T} T{ .sp 1 T}:T{ .sp Record Name T}:T{ .sp 127 T} T{ .sp 2 T}:T{ .sp Host Name T}:T{ .sp 255 T} T{ .sp 3 T}:T{ .sp User Name T}:T{ .sp 255 T} T{ .sp 4 T}:T{ .sp Password T}:T{ .sp 255 T} T{ .sp 5 T}:T{ .sp Comment T}:T{ .sp 511 T} .TE .sp .SH "OPTIONS" .sp The following options are supported: .sp \fB\-c\fP .RS 4 Show copyright. .RE .sp \fB\-h\fP .RS 4 Show help. .RE .sp \fB\-V\fP .RS 4 Show version. .RE .sp \fB\-p\fP \fIpassword\fP .RS 4 The password to be used to encrypt the YAPET file. If \fBcsv2yapet\fPis invoked without this option, it will prompt for the password on the standard input. .RE .sp \fB\-q\fP .RS 4 Enable the quiet mode. No details about errors are reported. .RE .sp \fB\-s\fP \fIseparator\fP .RS 4 Change the default field separator \*(Aq\fI,\fP\*(Aq (comma) to the single character \fIseparator\fP. .RE .sp \fIsrc\fP .RS 4 The source CSV file to be converted. .RE .sp \fIdst\fP .RS 4 The resulting YAPET file holding the content of \fIsrc\fP encrypted. This file must not exist prior to the conversion process, else \fBcsv2yapet\fP will not start the conversion and abort. .RE .SH "EXAMPLES" .SH "AN EXAMPLE OF A CSV FILE ACCEPTED BY \fBCSV2YAPET\fP." .sp The following example shows an excerpt of a CSV file as accepted for conversion by \fBcsv2yapet\fP. .sp As the second line shows, fields can be blank but the separator may not be omitted. .sp .if n .RS 4 .nf .fam C ssh host,host.example.org,johndoe,secret,Linux machine mail account,imap.email.org,john_doe,secret, .fam .fi .if n .RE .SS "An example of a CSV file accepted by \fBcsv2yapet\fP using double quotes." .sp The following example shows an excerpt of a CSV file as accepted for conversion by \fBcsv2yapet\fP. .sp 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 .fam C "ssh, ftp, and http server",server.example.org,johndoe,secret,Linux machine mail account,imap.email.org,john_doe,secret,"John ""the Unknown"" Doe" .fam .fi .if n .RE .SH "EXIT STATUS" .sp \fB0\fP .RS 4 No error. .RE .sp \fB1\fP .RS 4 Error while parsing command line argument. .RE .sp \fB2\fP .RS 4 The passwords provided on the standard input do not match. .RE .sp \fB3\fP .RS 4 The destination file \fIdst\fP already exists. .RE .sp \fB4\fP .RS 4 An unexpected error occurred. .RE .SH "BUGS" .sp Please report bugs to \c .URL "https://github.com/RafaelOstertag/yapet/issues" "" "." .SH "AUTHORS" .sp Rafael Ostertag \c .MTO "rafi\(atguengel.ch" "" "." .SH "SEE ALSO" .sp \fByapet\fP(1), \fByapet2csv\fP(1)