guile-csv ========= Guile csv reader ## USAGE ### install `$make` `$sudo make install` ### read csv ```scheme (use-modules (csv csv)) (define my-csv-reader (make-csv-reader #:\,)) (call-with-input-file "file.csv" my-csv-reader) ``` ### csv->xml ```scheme (call-with-input-file "file.csv" csv->xml) ``` and result could be: ```xml aaa 11 aaa@aaa.com bbb 12 bbb@bbb.com ``` ### sxml->csv or csv-write to output a csv format file ```scheme (call-with-output-file "file.csv" (lambda (port) (sxml->csv '((name age email) ("aaa" "11" "aaa@aaa.com") ("bbb" "12" "bbb@bbb.com")) port))) ``` and file.csv would be: ```csv name,age,email aaa,11,aaa@aaa.com bbb,12,bbb@bbb.com ``` Enjoy!