I just pushed the fix to github and released version 0.1.2. Sorry for the 
inconvenience.

I'm not really happy with the write part of data.csv. In the clojure spirit 
of simplicity it "complects" quoting of values with writing to disk. There 
might be different policies for when an api-user wants there values to be 
quoted:

* Quote everything (this can be done by setting :quote? to (constantly true)
* Quote nothing (this can be done by setting :quote? to (constantly false))
* Quote only when necessary (this is the default)
* Quote only the first row (i.e,, header)
* Quote (for example) the first and third column
* etc.

I thought about this a couple of days ago and the best I could come up with 
was to remove quoting from the writing part and have users quote there 
values as a pre-processing step before writing. If that is the way forward 
then there is almost nothing more to do in the writing part of the 
data.csv, e.g., you could just as well write

    (with-open [w (io/writer "some-file")]
      (with-binding [*out* w]
        (doseq [row data] 
          (println (string/join "," row)))
        
So It's not entirely clear to me if csv-write is needed at all and instead 
have a few helper functions, for example (quote-string s \'), together with 
a good description of how to use with-binding, doseq, str/join etc. in the 
README file.

Ideas welcome.

Jonas




-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to