0.3.4 • Published 2 years ago

csv-do v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

csv-do

Command line utilities for CSV based on NodeJS. Split, Group, Aggregate, Mix, Merge csv files.

Install

npm i csv-do -g

How to Use

csv-do is a command line utility that provides the following commands:

  1. split: You provide an --input-file and a --column number that has values to group content by and splits one csv file into different files based on the content of that column.
#split myfile.csv by the content of the 2nd column. Drop the files in folder ./split
csv-do split --input-file ./myfile.csv --columns 2 --output-folder ./split/

#split myfile.csv by the content of the 2nd and 5th columns combined. Drop the files in folder ./split
csv-do split --input-file ./myfile.csv --columns 2,5 --output-folder ./split/

#split myfile.csv in files of 100 rows maximum. Drop the files in folder ./split
csv-do split --input-file myfile.csv --chunk-size 100 --output-folder ./split/
  1. compare: You provide two file paths (--file1 and --file2) and the system will highlight differences between the two files in records found by those columns.
#compare file1.csv against file2.csv row by row.
csv-do compare --file1 ./file1.csv --file2 ./file2.csv

#compare file1b.csv against file2.csv row by row.
csv-do compare --file1 ./file1b.csv --file2 ./file2.csv

#compare file1c.csv against file2.csv by finding rows in file2.csv that match those in file1c.csv by the columns specified in --search-columns parameter.
csv-do compare --file1 ./file1b.csv --file2 ./file2.csv --search-columns \"5,16,20\"
0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago