{"id":18769190,"url":"https://github.com/puripuri2100/satysfi-csv","last_synced_at":"2026-02-12T10:06:19.552Z","repository":{"id":113144831,"uuid":"418010766","full_name":"puripuri2100/satysfi-csv","owner":"puripuri2100","description":"A CSV reader and writer for SATySFi.","archived":false,"fork":false,"pushed_at":"2021-10-18T12:51:05.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T09:34:15.764Z","etag":null,"topics":["csv","parser","satsyfi"],"latest_commit_sha":null,"homepage":"","language":null,"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/puripuri2100.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-17T03:41:48.000Z","updated_at":"2021-10-20T11:30:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"a93aab50-abea-415f-af90-6898e5256d48","html_url":"https://github.com/puripuri2100/satysfi-csv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/puripuri2100/satysfi-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puripuri2100%2Fsatysfi-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puripuri2100%2Fsatysfi-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puripuri2100%2Fsatysfi-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puripuri2100%2Fsatysfi-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puripuri2100","download_url":"https://codeload.github.com/puripuri2100/satysfi-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puripuri2100%2Fsatysfi-csv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","parser","satsyfi"],"created_at":"2024-11-07T19:15:05.605Z","updated_at":"2026-02-12T10:06:19.534Z","avatar_url":"https://github.com/puripuri2100.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# satysfi-csv\n\nA CSV reader and writer for SATySFi.\n\n\n# install\n\n\nYou can install csv package with [Satyrographos](https://github.com/na4zagin3/satyrographos).\n\n\n```sh\nopam update\n\nopam install satysfi-csv\n\nsatyrographos install\n```\n\nOR\n\n```sh\nopam pin add \"git+https://github.com/puripuri2100/satysfi-csv.git\"\n\nopam install satysfi-csv\n\nsatyrographos install\n```\n\n\nAfter installation, you can import this package by writing the code in preamble.\n\n```\n@require: csv/csv\n```\n\n\n# usage\n\nUse `CSV.parser` function to read the CSV.\n\n`CSV.parser` function returns `((string list) list) csv-parser-error result` type.\n\n`csv-parser-error` type is defined as follows:\n\n```\ntype csv-parser-erro =\n  | CSVParserErrorUnExpectedChar of int * string\n  | CSVParserErrorEOI\n```\n\n`'ok 'err result` type is defined in [satysfi-base/base.satyg](https://github.com/nyuichi/satysfi-base/blob/master/src/base.satyg#L49). Use the functions provided by [satysfi-base/result.satyg](https://github.com/nyuichi/satysfi-base/blob/master/src/result.satyg) when operating the `result` type.\n\n\n```\nlet csv = `1,2,3\na,\"b\nc\",\"\"d\",e\",f\"\"`\n\nlet csv-data = CSV.parser csv\n% =\u003e\n%Ok([\n%  [`1`; `2`; `3`];\n%  [`a`; `b\n%c`; `d\",e\",f`]\n%])\n```\n\nYou can change the delimiter of CSV:\n\n```\n\nlet csv = `1,000:2,000:3,000\na:\"b\nc\":\"\"d\":e\",f\"\"`\n\nlet csv-data = CSV.parser ?:(`:`) csv\n% =\u003e\n%Ok([\n%  [`1,000`; `2,000`; `3,000`];\n%  [`a`; `b\n%c`; `d\",e\",f`]\n%])\n```\n\n\nUse `CSV.printer` function to write the CSV data.\n\n`CSV.printer` is of type `string ?-\u003e (string list) list -\u003e string`\n\n```\nlet data = [\n  [`1`; `2`; `3`];\n  [`a\"b`; `a\"\nc\"d`; `e\nf`];\n]\n\nlet csv = CSV.printer data\n% ==\u003e\n%`1,2,3\n%\"\"a\"b\"\",\"\"a\"\n%c\"d\"\",\"e\n%f\"`\n\n% You can change the delimiter of CSV:\nlet csv2 = CSV.printer ?:(`:`) data\n% ==\u003e\n%`1:2:3\n%\"\"a\"b\"\":\"\"a\"\n%c\"d\"\":\"e\n%f\"`\n```\n\n---\n\nThis software released under the [MIT license](https://github.com/puripuri2100/satysfi-csv/blob/master/LICENSE).\n\nCopyright (c) 2021 Naoki Kaneko (a.k.a. \"puripuri2100\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuripuri2100%2Fsatysfi-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuripuri2100%2Fsatysfi-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuripuri2100%2Fsatysfi-csv/lists"}