{"id":13630386,"url":"https://github.com/NotWoods/csv-to-pouch","last_synced_at":"2025-04-17T13:32:21.040Z","repository":{"id":21350568,"uuid":"91612709","full_name":"NotWoods/csv-to-pouch","owner":"NotWoods","description":"Parse CSV files and save their data to a PouchDB database.","archived":false,"fork":false,"pushed_at":"2022-04-30T06:44:12.000Z","size":69,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-27T04:42:32.585Z","etag":null,"topics":["csv","pouchdb","stream"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotWoods.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-17T19:27:14.000Z","updated_at":"2022-04-30T06:43:31.000Z","dependencies_parsed_at":"2022-08-08T04:00:08.385Z","dependency_job_id":null,"html_url":"https://github.com/NotWoods/csv-to-pouch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fcsv-to-pouch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fcsv-to-pouch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fcsv-to-pouch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fcsv-to-pouch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotWoods","download_url":"https://codeload.github.com/NotWoods/csv-to-pouch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223757495,"owners_count":17197566,"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":["csv","pouchdb","stream"],"created_at":"2024-08-01T22:01:40.872Z","updated_at":"2024-11-08T21:31:48.054Z","avatar_url":"https://github.com/NotWoods.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# csv-to-pouch\nParse CSV files and save their data to a PouchDB database.\n\n## API\n```\nfunction parseCSVFile\u003cT\u003e(\n\tdb: PouchDB.Database\u003cT\u003e,\n\tinput: NodeJS.ReadableStream,\n\ttransformer?: (row: any) =\u003e T,\n): Promise\u003cvoid\u003e\n```\nParse CSV data from the input stream and save it to the PouchDB database.\nEach row is saved as a seperate PouchDB document. If the `_id` prexists in\nthe database, the existing document will be updated with the new version\nand the revision version will change.\n\n- **db**: Database to save results to.\n- **input**: Stream representing the CSV file,\n  such as `fs.createReadableStream('data.csv')`\n- **transformer**: Optional function to transform CSV rows.\n  Input `row` represents the CSV data, and the returned object will be used as a\n\tPouchDB document.\n\n## Command Line\nExamples:\n```\ncsv-to-pouch http://localhost:5984/mydb \u003c data.csv\ncsv-to-pouch --db http://localhost:5984/mydb -i data.csv\ncsv-to-pouch /path/to/mydb \u003c data.csv\ncsv-to-pouch http://localhost:5984/mydb -u myUsername -p myPassword \u003c data.csv\n```\n\nOptions:\n```\n--db            URL or filepath to database\n-i, --input     CSV file path. Can also pipe from stdin.\n-h, --help      Show help text\n-u, --username  Username for password-protected database\n-p, --password  Password for password-protected database\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotWoods%2Fcsv-to-pouch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNotWoods%2Fcsv-to-pouch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotWoods%2Fcsv-to-pouch/lists"}