rsvtools
========
:author: Andreas Romeyke
:toc:
:encoding: UTF-8
:lang: en

== About

The 'rsvtools' are helper tools to convert between comma separated values (CSV) and rows of string values (RSV).
RSV is a simple binary file format, which is described in https://github.com/Stenway/RSV-Specification[].

The RSV comes with own collection of implementations to prove that implementation in any programming language is easy, see https://github.com/Stenway/RSV-Challenge[] for details.

The 'rsvtools' are developed independently and with daily usage in mind. The 'rsvtools' should be small, but usefully 
combineable with other unix CLI commands.

== Usage

* simply convert a CSV file to a RSV: `csv2rsv <foo.csv >foo.rsv`
* simply convert a RSV file to a CSV: `rsv2csv <foo.rsv >foo.csv`

[HINT]
====
You must ensure, that your CSV file is UTF8-encoded, otherwise a conversion error occured:

* convert a Latin1 encoded CSV to RSV: `iconv -f ISO-8859-1 -t UTF-8 foo.csv | csv2rsv > foo.rsv`
* convert a RSV to a Latin1 encoded CSV: `rsv2csv <foo.rsv | iconv -f UTF-8 -t ISO-8859-1 > foo.csv`
====

The 'rsvtools' supports definitions to handle all variants of CSV-files. The defaults are:

* ',' - comma as separator between values
* '\' - slash as escape character
* '\n' - newline as end of line marker
* '"' - quotation mark as string quotation mark

== How to compile

Because 'rsvtools' does not have external dependencies, you could simply compile it with following steps in 'src/' directory:

* `cc -I include/ -O3 -static -o csv2rsv lib/rsv_common.c csv2rsv.c`
* `cc -I include/ -O3 -static -o rsv2csv lib/rsv_common.c rsv2csv.c`

There is also CMake support added, therefore use following steps:

* `mkdir build/`
* `cd build`
* `cmake ../src/ -G Ninja`
* `ninja`

Alternatively you could use CMake with Makefile support:

* `mkdir build/`
* `cd build`
* `cmake ../src/`
* `make`

There is also CPACK support included to create package files for Redhat,
Debian, etc. Additionally you should call:

* `cpack`


Description
No description provided
Readme 64 KiB
Languages
C 89.4%
CMake 10.6%