https://github.com/blue-yonder/di-csv2xml

di-csv2xml - a command line tool for converting CSV to Blue Yonder Supply & Demand API compatible XML

https://github.com/blue-yonder/di-csv2xml

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

di-csv2xml - a command line tool for converting CSV to Blue Yonder Supply & Demand API compatible XML

Basic Info
  • Host: GitHub
  • Owner: blue-yonder
  • License: mit
  • Language: Rust
  • Default Branch: master
  • Size: 301 KB
Statistics
  • Stars: 9
  • Watchers: 16
  • Forks: 8
  • Open Issues: 0
  • Releases: 26
Created about 8 years ago · Last pushed about 3 years ago
Metadata Files
Readme Changelog License

Readme.md

Blue Yonder CSV to XML converter

This tool is intended to convert a .csv file into an .xml file ready to be sent to the Blue Yonder Supply and Demand API. This tool has no schema information and therefore does not perform any validation besides checking for valid UTF8 encoding.

Usage

bash di-csv2xml --category Category --input input.csv --output output.xml

converts this input.csv file

csv A,B,C,D 1,2,3,4 5,6,7,8

into this output.xml:

xml <?xml version="1.0" encoding="UTF-8"?> <Category> <Record> <A>1</A> <B>2</B> <C>3</C> <D>4</D> </Record> <Record> <A>5</A> <B>6</B> <C>7</C> <D>8</D> </Record> </Category>

The shell's pipe functionality can be leveraged to produce the same result:

bash cat input.csv | di-csv2xml --category Category --input - > output.xml

Each line of the input.csv file is transformed into a separate XML-record. These are globally embedded into a root-tag structure specified by the parameter Category.

Customer extensions are supported via the CUEX_ prefix.

csv A,CUEX_B,C,CUEX_D 1,2,3,4

becomes

xml <?xml version="1.0" encoding="UTF-8"?> <Category> <Record> <A>1</A> <C>3</C> <CustomerExtensions> <B>2</B> <D>4</D> </CustomerExtensions> </Record> </Category>

For more information, please use di-csv2xml --help.

As this tool does not provide any schema validation, it is important to note that you get what you typed. Any typo in the parameter category or the header column of the csv-file is directly translated into the dedicated XML-tag, leading to potential errors when attempting to process the XML-file further.

Installation

Binary executable

You can download a binary executable (for 64Bit OS-X or Windows) from the release section.

From source

You can build a binary executable yourself using:

bash git clone https://github.com/blue-yonder/di-csv2xml.git cd di-csv2xml cargo build --release

You will find the executable in the .\target\release\ directory.

You can install cargo from here if it is not installed.

Homebrew

If you are a MacOS user, you can use homebrew to install di-csv2xml:

bash brew install by-stehessel/BlueYonder/di-csv2xml

Benchmarks

This tool uses criterion for benchmarking. You can execute the benchmarks with:

shell cargo bench

from within the folder, where you checked out this repository.

You should find a report with plots in ./target/criterion/report/index.html.

Support

This tool is provided as is under an MIT license without any warranty or SLA. You are free to use it as part for any purpose, but the responsibility for operating it resides with you. We appreciate your feedback though. Contributions on GitHub are welcome.

Owner

  • Name: Blue Yonder GmbH
  • Login: blue-yonder
  • Kind: organization
  • Location: Karlsruhe, Germany

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 7
  • Total pull requests: 39
  • Average time to close issues: 7 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 3
  • Total pull request authors: 5
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.31
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MilleMiles (3)
  • glitchtracker (2)
  • pacman82 (2)
Pull Request Authors
  • pacman82 (27)
  • stephan-hesselmann-by (9)
  • steffen-schroeder-by (1)
  • marco-neumann-by (1)
  • tacitvenom (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Cargo.lock cargo
  • 105 dependencies
Cargo.toml cargo
  • assert_cmd 2.0.4 development
  • criterion 0.3.5 development
  • tempfile 3.3.0 development
  • anyhow 1.0.53
  • atty 0.2.14
  • csv 1.1.6
  • flate2 1.0.22
  • humantime 2.1.0
  • indicatif 0.16.2
  • quick-xml 0.22.0
  • structopt 0.3.26
  • strum 0.23.0
  • strum_macros 0.23.1
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • svenstaro/upload-release-action v1-release composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite