0.1.0 • Published 1 year ago

x2c v0.1.0

Weekly downloads
-
License
CC0-1.0
Repository
-
Last release
1 year ago

x2c

CLI for XML to CSV Conversion

usage

create a config.json

x2c uses a configuration file in JSON format. here's an example:

{
  "columns": [
    { "name": "name", "path": ["gmd:name", "gco:CharacterString"] },
    { "name": "protocol", "path": ["gmd:protocol", "gco:CharacterString"] },
    { "name": "url", "path": ["gmd:linkage", "gmd:URL"] }
  ],
  "limit": 5,
  "offset": 2,
  "start": ["gmd:MD_DigitalTransferOptions", "gmd:CI_OnlineResource"],
  "debug": false
}

npx

cat data.xml | npx x2c --config=$PWD/config.json > data.csv

global install

npm install -g x2c

cat data.xml | x2c --config=$PWD/config.json > data.csv
0.1.0

1 year ago

0.0.1

1 year ago