logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

csv2yapet - convert CSV file to YAPET file

An Example Of A Csv File Accepted By Csv2Yapet.

       The following example shows an excerpt of a CSV file as accepted for conversion by csv2yapet.

       As the second line shows, fields can be blank but the separator may not be omitted.

           ssh host,host.example.org,johndoe,secret,Linux machine
           mail account,imap.email.org,john_doe,secret,

   AnexampleofaCSVfileacceptedbycsv2yapetusingdoublequotes.
       The following example shows an excerpt of a CSV file as accepted for conversion by csv2yapet.

       The first line demonstrates how to double quote fields containing the separator character. The second
       line shows how to literally convert double quote characters.

           "ssh, ftp, and http server",server.example.org,johndoe,secret,Linux machine
           mail account,imap.email.org,john_doe,secret,"John ""the Unknown"" Doe"

Authors

       Rafael Ostertag rafi@guengel.ch.

Bugs

       Please report bugs to https://github.com/RafaelOstertag/yapet/issues.

Description

       Convert a CSV file src to an YAPET file dst. The default character for delimiting the fields is ','
       (comma) unless specified otherwise on the command line by providing the -s.

       Fields containing the field separator character have to be enclosed in double quotes (").

       In order to convert a double quote character it has to be preceded by another double quote character.

       The following table describes the fields of the source CSV file as expected by csv2yapet:

       Table1.SourceFileFormat
       ┌──────────┬────────────────────┬───────────────────────┐
       │          │                    │                       │
       │ Column # │ YAPET Record Field │ Maximum size in bytes │
       ├──────────┼────────────────────┼───────────────────────┤
       │          │                    │                       │
       │ 1        │ Record Name        │ 127                   │
       ├──────────┼────────────────────┼───────────────────────┤
       │          │                    │                       │
       │ 2        │ Host Name          │ 255                   │
       ├──────────┼────────────────────┼───────────────────────┤
       │          │                    │                       │
       │ 3        │ User Name          │ 255                   │
       ├──────────┼────────────────────┼───────────────────────┤
       │          │                    │                       │
       │ 4        │ Password           │ 255                   │
       ├──────────┼────────────────────┼───────────────────────┤
       │          │                    │                       │
       │ 5        │ Comment            │ 511                   │
       └──────────┴────────────────────┴───────────────────────┘

Examples

Exit Status

0
           No error.

       1
           Error while parsing command line argument.

       2
           The passwords provided on the standard input do not match.

       3
           The destination file dst already exists.

       4
           An unexpected error occurred.

Name

       csv2yapet - convert CSV file to YAPET file

Options

       The following options are supported:

       -c
           Show copyright.

       -h
           Show help.

       -V
           Show version.

       -ppassword
           The password to be used to encrypt the YAPET file. If csv2yapetis invoked without this option, it
           will prompt for the password on the standard input.

       -q
           Enable the quiet mode. No details about errors are reported.

       -sseparator
           Change the default field separator ',' (comma) to the single character separator.

       src
           The source CSV file to be converted.

       dst
           The resulting YAPET file holding the content of  src encrypted. This file must not exist prior to the
           conversion process, else csv2yapet will not start the conversion and abort.

See Also

yapet(1), yapet2csv(1)

YAPET 2.6                                          2022-03-12                                       CSV2YAPET(1)

Synopsis

csv2yapet [[-c] | [-h] | [-V]] | [[-p password] [-q] [-s separator]] srcdst

See Also