Changeset 34219 in project


Ignore:
Timestamp:
07/01/17 23:33:10 (3 months ago)
Author:
kon
Message:

rel 0.11.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/csv-xml

    r27665 r34219  
    88== Documentation
    99
     10A CHICKEN version of "csv-scheme".
     11
     12=== Input
     13
    1014See [[http://www.neilvandyke.org/csv-scheme/|csv-scheme]] for the full documentation.
     15
     16==== reader-spec
     17
     18<procedure>(reader-spec [(newline-type 'lax) (separator-chars '(#\,)) (quote-char #\") (quote-doubling-escapes? #t) (comment-chars '()) (whitespace-chars '(#\space)) (strip-leading-whitespace? #f) (strip-trailing-whitespace? #f) (newlines-in-quotes? #t)]) => csv-reader-spec</procedure>
     19
     20Returns a {{csv-reader-spec}}.
     21
     22==== csv-reader?
     23
     24<procedure>(csv-reader? OBJECT) => boolean</procedure>
     25
     26Is the {{OBJECT}} a {{csv-reader}}?
     27
     28==== check-csv-reader
     29
     30<procedure>(check-csv-reader LOC OBJECT [ARG-NAME]) => csv-reader-procedure</procedure>
     31
     32==== error-csv-reader
     33
     34<procedure>(error-csv-reader LOC OBJECT [ARG-MESSAGE []])</procedure>
     35
     36==== csv-reader-spec?
     37
     38<procedure>(csv-reader-spec? OBJECT) => boolean</procedure>
     39
     40Is the {{OBJECT}} a {{csv-reader-spec}}?
     41
     42==== check-csv-reader-spec
     43
     44<procedure>(check-csv-reader-spec LOC OBJECT [ARG-NAME]) => csv-reader-spec</procedure>
     45
     46==== error-csv-reader-spec
     47
     48<procedure>(error-csv-reader-spec LOC OBJECT [ARG-MESSAGE []])</procedure>
     49
     50
     51=== Output
     52
     53==== make-csv-writer-maker
     54
     55<procedure>(make-csv-writer-maker WRITER-SPEC) => procedure</procedure>
     56
     57==== make-csv-writer
     58
     59<procedure>(make-csv-writer OUT-OR-STR [WRITER-SPEC]) => csv-writer-procedure</procedure>
     60
     61{{OUT-OR-STR}} is {{output-port}} or {{string}}. {{string}} is a {{pathname}}.
     62
     63==== list->csv
     64
     65<procedure>(list->csv LS [WRITER-OR-OUT])</procedure>
     66
     67{{LS}} is a {{list-of list}}. {{WRITER-OR-OUT}} is a {{csv-writer}} or {{output-port}}.
     68
     69==== list->sxml
     70
     71<procedure>(list->sxml LS [(row-element 'row) (column-elements (col-0...))]) => list</procedure>
     72
     73{{LS}} is a {{list-of list}}.
     74
     75<enscript language=scheme>
     76(list->sxml '((1 22 333) (11 2222 333333)))
     77;=> (
     78  *TOP*
     79  (row
     80    (col-0 1)
     81    (col-0 22)
     82    (col-0 333))
     83  (row
     84    (col-1 11)
     85    (col-1 2222)
     86    (col-1 333333))
     87)
     88</enscript>
     89
     90==== writer-spec
     91
     92<procedure>(writer-spec [(newline #t) (separator-char #\,) (quote-char #\")]) => boolean</procedure>
     93
     94Returns a {{csv-writer-spec}}.
     95
     96{{newline}} is {{#t}}, {{cr}}, {{lf}}, {{crlf}}. {{#t}} is the platform default.
     97
     98==== csv-writer?
     99
     100<procedure>(csv-writer? OBJECT) => boolean</procedure>
     101
     102Is the {{OBJECT}} a {{csv-writer}}?
     103
     104==== check-csv-writer
     105
     106<procedure>(check-csv-writer LOC OBJECT [ARG-NAME]) => csv-writer-procedure</procedure>
     107
     108==== error-csv-writer
     109
     110<procedure>(error-csv-writer LOC OBJECT [ARG-MESSAGE []])</procedure>
     111
     112==== csv-writer-spec?
     113
     114<procedure>(csv-writer-spec? OBJECT) => boolean</procedure>
     115
     116Is the {{OBJECT}} a {{csv-writer-spec}}?
     117
     118==== check-csv-writer-spec
     119
     120<procedure>(check-csv-writer-spec LOC OBJECT [ARG-NAME]) => csv-writer-spec</procedure>
     121
     122==== error-csv-writer-spec
     123
     124<procedure>(error-csv-writer-spec LOC OBJECT [ARG-MESSAGE []])</procedure>
    11125
    12126
     
    22136Neil van Dyke
    23137
    24 for Chicken by [[kon lovett]]
     138for Chicken by [[kon lovett|Kon Lovett]]
    25139
    26140
     
    33147== Version history
    34148
     149; 0.11.0 : Add {{reader-spec}}, ''csv-out'' stuff.
    35150; 0.10.2 : Escape character, '\', in quoted strings.
    36151; 0.10.1 :
Note: See TracChangeset for help on using the changeset viewer.