gbv / jskos-tools

Tools for working with the JSKOS data format.
https://gbv.github.io/jskos-tools/
MIT License
2 stars 0 forks source link

Improve mappingToCSV #6

Closed stefandesu closed 5 years ago

stefandesu commented 5 years ago
let csv = jskos.mappingCSV({
  lineTerminator: "\r\n"
})
// single mapping
csv.fromMapping(mapping)
// multiple mappings (includes header by default)
csv.fromMappings(mappings, { header: true } )
// get header based on list of mappings (also used by "fromMappings")
csv.header(mappings)

This is needed for https://github.com/gbv/cocoda/issues/185.

stefandesu commented 5 years ago

Sent with GitHawk

stefandesu commented 5 years ago

Bump. Related to https://github.com/gbv/cocoda/issues/185.

stefandesu commented 5 years ago

@nichtich How should compound mappings look like in the exported CSV?

nichtich commented 5 years ago

As suggested at https://github.com/gbv/cocoda/issues/185#issue-373449654: add columns such as toNotation2, toNotation3..

stefandesu commented 5 years ago

I missed that, thanks!

stefandesu commented 5 years ago

Opened a PR: https://github.com/gbv/jskos-tools/pull/20

stefandesu commented 5 years ago

Merged.