bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Tentative CSV extension - please advise


From: Manuel Collado
Subject: [bug-gawk] Tentative CSV extension - please advise
Date: Mon, 14 Mar 2016 23:14:20 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0

I'm considering to develop a CSV read/write extension. Currently in a very preliminary stage. Just reading specs, api docs, collecting csv libraries for a variety of languages, etc.

In order to organize things in an adequate way, please confirm, correct or comment the following points:

1.- The extension should provide CSV field values as $1-$NF

2.- The current extension api only allows to provide a string value for $0, but not individual field values. $0 is split into fields by the gawk core according to the current FS.

3.- A possible solution would be to forge a $0 record by joining the csv fields with a customizable ad-hoc field separator, and temporarily set FS to that separator value.

4.- The extension should be able to process CSV files that deviate from the standard. A set of option flags could be set by the user in order to customize the parsing.

5.- CSV file samples would be welcomed. Specially non standard or even malformed ones.

6.- Help about how to initially setup a gawkextlib extension development directory will be really appreciated.

Thanks in advance.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado




reply via email to

[Prev in Thread] Current Thread [Next in Thread]