Closed metasoarous closed 7 years ago
Some further thoughts on this:
We should be able to leave the current :keywordify
option by having that option take precedence if :transform-header
is not specified, and let :transform-header
take precedence otherwise. This keeps us from breaking the API.
Also, we should provide a few helper functions with some particular conventions. Maybe, idiomatic-column-name
which lower cases, then replaces spaces and underscores with dashes. Some others could just replace spaces with dashes, remove spaces, etc.
See comments by dunnowins here: https://www.reddit.com/r/Clojure/comments/35b6dl/semanticcsv_highlevel_csv_processing_tools_for/
If you are not very pro-batteries included, https://github.com/qerub/camel-snake-kebab includes just about every conversion under the sun.
That's nice! Thanks for the suggestion. I'd like to middle ground on batteries, so in addition to some nice sane options, referring folks to csk is a great idea.
This was closed by #33
This would just be a function applied to each one of the headers column names to get a new column name. Returning
nil
should leave unaltered, so that a map could be used easily for transforming a subset of the header names. There is some question here though about how this would play with the:keywordify
option.