{"_id":"@aleung/csvsplit","_rev":"6-8eaee39306ddad862c313f74b8667eb5","name":"@aleung/csvsplit","description":"CLI utility to split CSV into multiples files base on value of a specified column","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"@aleung/csvsplit","version":"2.0.0","description":"## Feature","main":"index.js","bin":{"csvsplit":"./index.js"},"engines":{"node":">=6.0.0"},"preferGlobal":true,"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Leo Liang"},"license":"MIT","keywords":["csv"],"repository":{"type":"git","url":"git+https://github.com/aleung/csvsplit.git"},"dependencies":{"csv":"^1.1.0","lodash":"^4.13.1","yargs":"^4.7.1"},"gitHead":"d3130b76dbf5b6887a0e9d1d35b19ee32034add8","bugs":{"url":"https://github.com/aleung/csvsplit/issues"},"homepage":"https://github.com/aleung/csvsplit#readme","_id":"@aleung/csvsplit@2.0.0","_shasum":"722e743768c4a043ad6c4012c9b9bcb720552148","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"aleung","email":"leoliang@gmail.com"},"dist":{"shasum":"722e743768c4a043ad6c4012c9b9bcb720552148","tarball":"https://registry.npmjs.org/@aleung/csvsplit/-/csvsplit-2.0.0.tgz","integrity":"sha512-QqeUlddKLiE6zB9VmN87g85e32c78nNtLivS0TKVAbNzK8AtGDlMgozFuNGgoVEIXq4eIptkxj6b0hUfvYAViQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCImt8FhAtxq92jXs9XnrVpU6k5VnPSdT2cKXd03MEvJQIgf5+uVH3OermVtufMpgdorBPcUW6Fd4ysKW4AKelfBTY="}]},"maintainers":[{"name":"aleung","email":"leoliang@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/csvsplit-2.0.0.tgz_1464760483965_0.4436077317222953"},"directories":{}},"2.0.1":{"name":"@aleung/csvsplit","version":"2.0.1","description":"CLI utility to split CSV into multiples files base on value of a specified column","main":"index.js","bin":{"csvsplit":"index.js"},"engines":{"node":">=6.0.0"},"author":{"name":"Leo Liang","email":"leo.liang@gmail.com"},"license":"MIT","keywords":["csv"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/aleung/csvsplit.git"},"dependencies":{"csv":"^5.3.2","lodash":"^4.17.20","yargs":"^15.4.1"},"gitHead":"b91a42c59cb3f39d3125caae5cb7b089e86f40a2","bugs":{"url":"https://github.com/aleung/csvsplit/issues"},"homepage":"https://github.com/aleung/csvsplit#readme","_id":"@aleung/csvsplit@2.0.1","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-dVclyYXPhvcDhuthdWQBJJ841Wlq8Em7FEie6W4kXFKSQHDAkIkdJQFEsD1nNPjExnGHd5nV9As7QkriHHIxZA==","shasum":"20a6dbae312c656598ed944dc83d2e646327a4de","tarball":"https://registry.npmjs.org/@aleung/csvsplit/-/csvsplit-2.0.1.tgz","fileCount":4,"unpackedSize":6528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOiYzCRA9TVsSAnZWagAAEZgQAJhSDkUwIJkwfXgLUzNZ\na3Yhpw+dpC3dsiK8QydHGJbc+g4L6IaT9KXTCHXaq0kGoUP4Pq4LMs1nnDxh\n0R4SP62nu7lnzdpI+VrNmuzR0Anh4su8F6TM1SSywJ1cJPyUR41ZbSDe8syq\nEU2etM1DSuqkKXHIe2BpQYvl7rIpcQ7mJR0L9ZCuYOwOucqJBWzYP5Cl2Q8Q\nXRWDU1aGyb7IekQAUMhWM1GTslizkdu2TMX3RkZqR2eSeTV+l+RvuWHg1nvn\nK5UxnNpnLQ0NFpvfsb+oyhFC3tyfrA1x1R9DGZj574oF3jQ5PWe+lf37+XBP\nLEfPUa1Dl0ADj+J/zCE8w7rGOR+zrpzi5fYKpkw8ZYkj/vAUaHcOlKnWBz3F\nndIFB13izXawcU+UJpxbiCWFChzOon0APZ13U6Iuxssv/7lyoXPVhaET9sZz\nEA6hGZ648K7Iin3/bONF5PsnIa+kmC8XwIFS0Kkp4awb9cXh5Z9rlTw9hFN2\n28E8WJpZlCWhcvXTB/nj9hE7dzIzqaaJClBymAJIkekc1zvog5ZT3ZXmYslp\nLLF7w1wKikIYMQXwz+8k62jXC2uKeJhneetFUejHkmuP1gOOKgRi6GvWgThk\nMwPNpcODY3fu8Rpf8oIky0yFFgFdtw/Qp3/sXDg8gPH18/pxqM+Vi2G1dV32\n+iCi\r\n=o41z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQfQHTT4/pYhm0TmHrWs+rzQ+8LKz4H/ajixHGxvkQVAiEAuAmpRuYVwc6uCDA+Os/fYq/QbsN3FL7txutRKh8S2TQ="}]},"maintainers":[{"name":"aleung","email":"leoliang@gmail.com"}],"_npmUser":{"name":"aleung","email":"leoliang@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/csvsplit_2.0.1_1597646387294_0.3967270630790223"},"_hasShrinkwrap":false},"2.1.0":{"name":"@aleung/csvsplit","version":"2.1.0","description":"CLI utility to split CSV into multiples files base on value of a specified column","type":"module","main":"index.js","bin":{"csvsplit":"index.js"},"scripts":{"test":"node test.js"},"engines":{"node":">=12.0.0"},"author":{"name":"Leo Liang","email":"leo.liang@gmail.com"},"license":"MIT","keywords":["csv"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"https://github.com/aleung/csvsplit.git"},"dependencies":{"csv":"^5.3.2","lodash":"^4.17.20","yargs":"^16.2.0"},"devDependencies":{"dir-compare":"^3.1.5","fs-monkey":"^1.0.3","jest":"^26.6.3","memfs":"^3.2.2"},"_id":"@aleung/csvsplit@2.1.0","dist":{"shasum":"86c1fd51cad85b5de81511ec487b02a28051a0c0","integrity":"sha512-KzxWJ9GPTObhjBTAdQFFcxt2u77nLvbQPSJAIChxKHy2wIXxlPM2gMuPLip6a59PnicQNECgkRB+Gqw2yJbIuA==","tarball":"https://registry.npmjs.org/@aleung/csvsplit/-/csvsplit-2.1.0.tgz","fileCount":21,"unpackedSize":9010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghZSeCRA9TVsSAnZWagAA0PgP/2tlhGSVD3LevBz+O9O+\nBBZxGEWcUnJaChYyZWQ7k4BL9LoMdoRXvj87dRGFmlfCuWTEUPcihVHz9Um4\nKQVtKejjKsYZx/DIvMvrr0YnFVJx0gVd8gEG01Zl0rElGuwVsWirZ2Zh/6MV\nI2jho25chL6+Yq3mBZP/Oa0eD0XI7y9SsLIkopRjb8/VUrLM0Qy614icNcfz\n9z/EYJLVbBxifCyS7sKKV/NU2YyGw9oVyxgZrak/+RbTymswvWoqPJ9FIfl+\naWI3VBhecKBBAWMo4AFCe1xy/1XPvO2ELwFQZSRam21ZhEhsRM2Av9sMLFCc\nfOswJjyiYygKF3YJmn63ghwHVwZAAm7u5hEoC52qIyFs89p2faAKHgbblP8J\naSxmzV4TEzHCyNno1O7sBeesEOoVi6bSUxTKmlvHruKY6i49IxDk7sG/D2pP\n8A3lj63bByNBjei6+CLzx34nzhLgTJH3v2oQOwmunGX+OFPpwlZIWpuZQDQA\nbvJFvDl2QbjvqPCrpIuYGiKdDS1g5fnvgVtIdqdfqsPPLoAeVOSkgVOhYN/Z\nExoU9eOwdsc5Pt+/RcoupuJfFzCZNPW7u74+89kFzmnZF9vTfqB7FbJAXzCf\nSF70NpG1Ts9gYrbM0XS0dTPlIKpATMRuKEknHkOiAwTnGndtVz+lCzRaXJOq\nfRue\r\n=BF/A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEZkPTvzDuxP8lKkopTo+/AuXDoYI0CUbfi741gd3fZwIhAMfNyC+E9O0oztev+5isgmNGMGOLvBASQosHJxgowtKq"}]},"_npmUser":{"name":"aleung","email":"leoliang@gmail.com"},"directories":{},"maintainers":[{"name":"aleung","email":"leoliang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/csvsplit_2.1.0_1619367069936_0.345179229019138"},"_hasShrinkwrap":false}},"readme":"# CSV Split\n\n[![npm version](https://img.shields.io/npm/v/@aleung/csvsplit.svg?maxAge=2592000)](https://www.npmjs.com/package/@aleung/csvsplit)\n\nCLI utility to split CSV into multiples files base on value of a specified column.\n\n## Feature\n\nYou have one or more data sheets. You want to split data into files and each one groups the records which have same value in a column.\n\n> input.csv\n\n| id | name | group |\n|----|------|-------|\n| 1  | Alice | A    |\n| 2  | Bob   | B    |\n| 3  | Charley | A  |\n| 4  | David | B     |\n\nBeing processed with __csvsplit__, base on value of column `group`, it becomes:\n\n> A.csv\n\n| id | name | group |\n|----|------|-------|\n| 1  | Alice | A    |\n| 3  | Charley | A  |\n\n> B.csv\n\n| id | name | group |\n|----|------|-------|\n| 2  | Bob   | B    |\n| 4  | David | B    |\n\nIt's able to process multiple input files. No need to combile them beforehead.\n\n## Install\n\nThis tool runs on node.js execution environment. If node.js hasn't been\ninstalled on your OS, download from [Node.js official site](https://nodejs.org/en/download/current/)\nand install it.\n\nOn command line, type `node --version` to make sure node.js has been\ninstalled properly. Node.js v12.0 or higher is required.\n\nInstall CSV split:\n\n    npm install -g @aleung/csvsplit\n\nIt runs on any OS platform that node.js supports.\n\nYou could run CSV split without installation by adding `npx` before the command:\n\n    npx csvsplit [options...]\n\n## Usage\n\n```\n$ csvsplit --help\nUsage: /usr/local/bin/csvsplit [options] <inputfiles>\n\nOptions:\n  -c, --column  The index of column base which to split (A=1, B=2 ...)             [number] [required]\n  -f, --filter  If set, only when the column value is in this list will be outputed. Configure with a\n                comma seperated list of values.                                               [string]\n  -o, --output  Directory to put generated files into                         [string] [default: \"./\"]\n  --no-header  The input CSV file has no header                             [boolean] [default: false]\n  --help        Show help                                                                    [boolean]\n  --version     Show version number                                                          [boolean]\n\nExamples:\n  /usr/local/bin/csvsplit -c 2 -o ./output             Process all CSV files and split base on the 2nd\n  ./input/*.csv                                        column\n```\n\nThe generated csv files are named into the value of the column base on which to split.\n\nThere might be an extra csv file generated, in which contains only the header.\nJust delete it.\n\nIf you get \"Too many open files\" issue, try to use `--filter` option to limit the number of generated files.\n\n## Development\n\n```\n$ yarn install\n$ yarn test\n```\n","maintainers":[{"name":"aleung","email":"leoliang@gmail.com"}],"time":{"modified":"2022-06-12T14:28:02.599Z","created":"2016-06-01T05:54:45.093Z","2.0.0":"2016-06-01T05:54:45.093Z","2.0.1":"2020-08-17T06:39:47.422Z","2.1.0":"2021-04-25T16:11:10.093Z"},"keywords":["csv"],"repository":{"type":"git","url":"https://github.com/aleung/csvsplit.git"},"author":{"name":"Leo Liang","email":"leo.liang@gmail.com"},"license":"MIT","readmeFilename":"README.md"}