{"id":21611308,"url":"https://github.com/runnerty/executor-csv2json","last_synced_at":"2025-03-18T16:04:46.703Z","repository":{"id":83643090,"uuid":"352160692","full_name":"runnerty/executor-csv2json","owner":"runnerty","description":"Runnerty module: CSV to JSON executor","archived":false,"fork":false,"pushed_at":"2022-10-13T12:51:49.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-21T01:01:16.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runnerty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-27T19:35:57.000Z","updated_at":"2024-03-21T01:01:16.115Z","dependencies_parsed_at":"2023-05-09T15:48:26.990Z","dependency_job_id":null,"html_url":"https://github.com/runnerty/executor-csv2json","commit_stats":{"total_commits":6,"total_committers":3,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"6e4073d8197feebf1ef475c1f0c18a227daafa86"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-csv2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-csv2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-csv2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-csv2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runnerty","download_url":"https://codeload.github.com/runnerty/executor-csv2json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244257279,"owners_count":20424131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T21:11:55.663Z","updated_at":"2025-03-18T16:04:46.662Z","avatar_url":"https://github.com/runnerty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://runnerty.io\"\u003e\n    \u003cimg height=\"257\" src=\"https://runnerty.io/assets/header/logo-stroked.png\"\u003e\n  \u003c/a\u003e\n  \u003cp align=\"center\"\u003eSmart Processes Management\u003c/p\u003e\n\u003c/p\u003e\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Dependency Status][david-badge]][david-badge-url]\n\u003ca href=\"#badge\"\u003e\n\u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"\u003e\n\u003c/a\u003e\n\n# Executor for [Runnerty]: CSV2JSON\n\n### Installation:\n\nThrough NPM\n\n```bash\nnpm i @runnerty/executor-csv2json\n```\n\nYou can also add modules to your project with [runnerty-cli]\n\n```bash\nnpx runnerty-cli add @runnerty/executor-csv2json\n```\n\nThis command installs the module in your project, adds example configuration in your `config.json` and creates an example plan of use.\n\nIf you have installed [runnerty-cli] globally you can include the module with this command:\n\n```bash\nrty add @runnerty/executor-csv2json\n```\n\n### Configuration sample:\n\nAdd in [config.json]:\n\n```json\n{\n  \"id\": \"csv2json_default\",\n  \"type\": \"@runnerty-executor-csv2json\"\n}\n```\n\n### Plan sample:\n\nAdd in [plan.json]:\n\n#### Example 1:\n\n```json\n{\n  \"id\": \"csv2json_default\",\n  \"inputPath\": \"test.csv\",\n  \"outputPath\": \"test.json\",\n  \"options\": {\n    \"headers\": true,\n    \"delimiter\": \";\",\n    \"escape\": \"\\\"\"\n  }\n}\n```\n\n#### Example 2:\n\n```json\n{\n  \"id\": \"csv2json_default\",\n  \"inputPath\": \"test.csv\",\n  \"options\": {\n    \"headers\": [\"id_renamed\", null, \"email\"],\n    \"renameHeaders\": true,\n    \"discardUnmappedColumns\": true,\n    \"delimiter\": \"|\"\n  }\n}\n```\n\n### Params\n\n#### Options\n\n| Option                 | Description                                                                                                                               |\n| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| delimiter              | The delimiter that will separate columns. Default: ','                                                                                    |\n| quote                  | The character to use to quote fields that contain a delimiter. Default: '\"'                                                               |\n| escape                 | The character to used tp escape quotes inside of a quoted field. Default: '\"'                                                             |\n| headers                | If set to true the first row will be treated as the headers. If you want to manually specify the headers set to a string[]. Default: true |\n| renameHeaders          | If you want the first line of the file to be removed and replaced by the one provided in the headers option. Default: false               |\n| ignoreEmpty            | Set to true to ignore empty rows. Default: false                                                                                          |\n| comment                | If your CSV contains comments you can use this option to ignore lines that begin with the specified character. Default: null              |\n| discardUnmappedColumns | If you want to discard columns that do not map to a header. Default: false                                                                |\n| strictColumnHandling   | If you want to consider empty lines/lines with too few fields as invalid and emit a data-invalid event. Default: false                    |\n| trim                   | Set to true to trim all white space from columns. Default: false                                                                          |\n| rtrim                  | Set to true to right trim all columns. Default: false                                                                                     |\n| ltrim                  | Set to true to left trim all columns. Default: false                                                                                      |\n| encoding               | Passed to StringDecoder when decoding incoming buffers. Change if incoming content is not 'utf8' encoded. Default: 'utf8'                 |\n| maxRows                | If number is \u003e 0 then only the specified number of rows will be parsed. Default: 0                                                        |\n| skipRows               | If number is \u003e 0 then the specified number of parsed rows will be skipped. Default: 0                                                     |\n| skipLines              | If number is \u003e 0 the specified number of lines will be skipped. Default: 0                                                                |\n\n### Output (Process values):\n\n- `PROCESS_EXEC_MSG_OUTPUT`: Output message.\n- `PROCESS_EXEC_ERR_OUTPUT`: Error output message.\n\n#### Data output\n\n- `PROCESS_EXEC_DATA_OUTPUT`: JSON output data.\n- `PROCESS_EXEC_DB_ROWCOUNT`: Count rows.\n\n### More information:\n\nThis executor uses the fast-csv module, for more information consult the website of the [csv2json].\n\n[runnerty]: http://www.runnerty.io\n[downloads-image]: https://img.shields.io/npm/dm/@runnerty/executor-csv2json.svg\n[npm-url]: https://www.npmjs.com/package/@runnerty/executor-csv2json\n[npm-image]: https://img.shields.io/npm/v/@runnerty/executor-csv2json.svg\n[david-badge]: https://david-dm.org/runnerty/executor-csv2json.svg\n[david-badge-url]: https://david-dm.org/runnerty/executor-csv2json\n[config.json]: http://docs.runnerty.io/config/\n[plan.json]: http://docs.runnerty.io/plan/\n[runnerty-cli]: https://www.npmjs.com/package/runnerty-cli\n[csv2json]: https://github.com/C2FO/fast-csv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunnerty%2Fexecutor-csv2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunnerty%2Fexecutor-csv2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunnerty%2Fexecutor-csv2json/lists"}