Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the csv-parser Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:21:26 2022 GMT+0.
Next: Systems, Previous: The csv-parser Reference Manual, Up: The csv-parser Reference Manual [Contents][Index]
CSV parsing/writing utilities, a la Microsoft Excel. Author: Alain Picard(also alain.picard@memetrics.com) Notes ----- Differences from Faré's CSV reader: * this one can import DOS formatted files into a unix image, and not have the redundant ^M splattered at the end of the fields. This is important when processing a file on a Unix server which is being uploaded via HTTP by some poor schmuck on a windoze box. * Handles empty trailing fields properly * comes with test suite, to see the semantics I've chosen to implement * I've included a couple of high-level goodies, like do-csv-file and map-csv-file, as well as the ability to control the range of line-numbers on which to apply your code. Pretty simple stuff, but useful. * You get a CSV-file writer, for free! :-)
Next: Files, Previous: Introduction, Up: The csv-parser Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
CSV parsing/writing utilities, a la Microsoft Excel
Alain Picard <alain.picard@memetrics.com>
LLGPL
csv-parser.lisp (file).
Next: Packages, Previous: Systems, Up: The csv-parser Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: csv-parser/csv-parser.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
csv-parser (system).
Previous: csv-parser/csv-parser.asd, Up: Lisp [Contents][Index]
csv-parser (system).
Next: Definitions, Previous: Files, Up: The csv-parser Reference Manual [Contents][Index]
Packages are listed by definition order.
common-lisp.
Next: Indexes, Previous: Packages, Up: The csv-parser Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Macros, Previous: Public Interface, Up: Public Interface [Contents][Index]
The character used to indicate the end of a field in a CSV file.
The character used to protect embedded field separators
(usually commas) and whitespace within a field.
To import the *quote-character* itself, you must have it printed twice in the input stream.
Next: Ordinary functions, Previous: Special variables, Up: Public Interface [Contents][Index]
Repeatedly call BODY on CSV file FILE, binding
FIELDS and NUM-FIELDS to a list containing the parsed fields,
and the number of fields.
Code runs inside a block with tagname NIL, so you
may call (RETURN).
*FIELD-SEPARATOR* and *QUOTE-CHARACTER* can be bound to modify what separates fields and delimits fields.
Previous: Macros, Up: Public Interface [Contents][Index]
Call FN (up to LIMIT times, if specified) with
a list containing the fields parsed from the CSV
file FILE.
SKIP-LINES, if provided, is the number of lines to skip
before starting to call FN.
*FIELD-SEPARATOR* and *QUOTE-CHARACTER* can be bound to modify what separates fields and delimits fields.
Read one line form a stream containing CSV data. Returns two values; a list of strings parsed, and the number of parsed values.
Write one CSV line to STREAM, containing fields.
FIELDS is any (1d) sequence containing strings, symbols or numbers.
Try to write it as esthetically pleasing as possible,
i.e. don’t output the *quote-character* unless necessary
to protect the integrity of the data.
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
Holds the field we are currently working on.
Holds the fields we have collected/parsed so far.
Keeps track of how many blanks have been skipped. When emitting
a field, we can trim extra right spaces, if appropriate, using this.
Holds a function which knows how to handle chars based on what we’ve seen so far.
Previous: Special variables, Up: Internals [Contents][Index]
Previous: Definitions, Up: The csv-parser Reference Manual [Contents][Index]
Jump to: | A C D E F G M Q R S W |
---|
Jump to: | A C D E F G M Q R S W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|