csvnorm
Command line tool to normalize CSV and *SV files.
Last updated 6 months ago by adius .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install csvnorm 
SYNC missed versions from official npm registry.

Csvnorm

Command line tool to normalize CSV and *SV files.

Steps:

  • Convert to UTF-8 encoding
  • Replace separator with ,
  • Reformat
    • Date columns to ISO8601
    • Number columns to 1456.25
    • Currency columns to 1539.16 $

CLI Version

Installation

npm install --global csvnorm
yarn global add csvnorm

Usage

Usage:
  csvnorm [Options] INFILE [> OUTFILE]
  csvnorm [Options] < INFILE [> OUTFILE]

Options:
  --encoding    Overwrite detected input encoding                       [string]
  --in-place    Normalize CSV file in place           [boolean] [default: false]
  --skip-start  Skip lines at the start of the input       [number] [default: 0]
  --version     Show version number                                    [boolean]
  --help        Show help                                              [boolean]

Examples:
  csvnorm input.csv > normalized.csv        Normalize a CSV file
  cat input.csv | csvnorm > normalized.csv  Pipe and normalize a CSV file

Node Module

Installation

npm install --save csvnorm
yarn add csvnorm

Usage

With files:

const csvnorm = require('csvnorm')

csvnorm({
  filePath: csvFilePath,
  inPlace: true,
})

With streams:

const csvnorm = require('csvnorm')

csvnorm({
  readableStream: process.stdin,
  writableStream: process.stdout,
})

TODO

Current Tags

  • 0.6.0                                ...           latest (6 months ago)

9 Versions

  • 0.6.0                                ...           6 months ago
  • 0.5.0                                ...           6 months ago
  • 0.4.3                                ...           2 years ago
  • 0.4.2                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 4
Dependencies (12)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |