{"id":35145105,"url":"https://github.com/phamduylong/csv2mdtable","last_synced_at":"2026-04-28T09:02:06.212Z","repository":{"id":329726546,"uuid":"1114728362","full_name":"phamduylong/csv2mdtable","owner":"phamduylong","description":"A small utility project to convert CSV files into markdown's table syntax.","archived":false,"fork":false,"pushed_at":"2026-01-03T20:42:58.000Z","size":84,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-03T23:10:18.908Z","etag":null,"topics":["csv","csv-converter","go","golang","markdown","md","modules","package","readme-generator","table"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/phamduylong/csv2mdtable","language":"Go","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/phamduylong.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-11T19:53:17.000Z","updated_at":"2026-01-03T20:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phamduylong/csv2mdtable","commit_stats":null,"previous_names":["phamduylong/csv-to-md","phamduylong/csv2mdtable"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/phamduylong/csv2mdtable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamduylong%2Fcsv2mdtable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamduylong%2Fcsv2mdtable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamduylong%2Fcsv2mdtable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamduylong%2Fcsv2mdtable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phamduylong","download_url":"https://codeload.github.com/phamduylong/csv2mdtable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamduylong%2Fcsv2mdtable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32238748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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","csv-converter","go","golang","markdown","md","modules","package","readme-generator","table"],"created_at":"2025-12-28T13:38:47.399Z","updated_at":"2026-04-24T20:03:34.463Z","avatar_url":"https://github.com/phamduylong.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSV To Markdown Table Converter [![Go Reference](https://pkg.go.dev/badge/github.com/phamduylong/csv-to-md.svg)](https://pkg.go.dev/github.com/phamduylong/csv-to-md)\n\nThis is a utility tool used to convert [Comma-separated values (CSV)](https://en.wikipedia.org/wiki/Comma-separated_values) files to a [Markdown table](https://www.markdownguide.org/extended-syntax/#tables). You can test it out in the [Go playground](https://go.dev/play/p/p42h8-jG5dQ).\n\n## Table Of Contents\n\n- [CSV To Markdown Table Converter](#csv-to-markdown-table-converter-)\n  - [Table Of Contents](#table-of-contents)\n  - [Usage](#usage)\n  - [Configuration Options](#configuration-options)\n\n## Usage\n\nAn example conversion can look like this:\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n\n  csv2mdtable \"github.com/phamduylong/csv-to-md\"\n)\n\nfunc main() {\n  var cfg csv2mdtable.Config\n  cfg.Align = csv2mdtable.Left\n  cfg.VerboseLogging = true\n  \n  csv := `Index,Customer Id,First Name,Last Name,Company,City,Country,Phone\n1,DD37Cf93aecA6Dc,Sheryl,Baxter,Rasmussen Group,East Leonard,Chile,229.077.5154\n2,1Ef7b82A4CAAD10,Preston,Lozano,Vega-Gentry,East Jimmychester,Djibouti,5153435776\n3,6F94879bDAfE5a6,Roy,Berry,Murillo-Perry,Isabelborough,Antigua and Barbuda,+1-539-402-0259\n4,5Cef8BFA16c5e3c,Linda,Olsen,\"Dominguez, Mcmillan and Donovan\",Bensonview,Dominican Republic,001-808-617-6467x12895\n5,053d585Ab6b3159,Joanna,Bender,\"Martin, Lang and Andrade\",West Priscilla,Slovakia (Slovak Republic),001-234-203-0635x76146`\n\n  res, convertErr := csv2mdtable.Convert(csv, cfg)\n\n  if convertErr != nil {\n    fmt.Println(convertErr)\n  }\n\n  fmt.Printf(\"Converted table:\\n\\n%s\\n\", res)\n}\n```\n\nOutput would look like this:\n\n```console\n2009/11/10 23:00:00 DEBUG Validating config 🤔\n2009/11/10 23:00:00 DEBUG Config is valid ✅\nConverted table:\n\n| Index | Customer Id     | First Name | Last Name | Company                         | City              | Country                    | Phone                  |\n| :---- | :-------------- | :--------- | :-------- | :------------------------------ | :---------------- | :------------------------- | :--------------------- |\n| 1     | DD37Cf93aecA6Dc | Sheryl     | Baxter    | Rasmussen Group                 | East Leonard      | Chile                      | 229.077.5154           |\n| 2     | 1Ef7b82A4CAAD10 | Preston    | Lozano    | Vega-Gentry                     | East Jimmychester | Djibouti                   | 5153435776             |\n| 3     | 6F94879bDAfE5a6 | Roy        | Berry     | Murillo-Perry                   | Isabelborough     | Antigua and Barbuda        | +1-539-402-0259        |\n| 4     | 5Cef8BFA16c5e3c | Linda      | Olsen     | Dominguez, Mcmillan and Donovan | Bensonview        | Dominican Republic         | 001-808-617-6467x12895 |\n| 5     | 053d585Ab6b3159 | Joanna     | Bender    | Martin, Lang and Andrade        | West Priscilla    | Slovakia (Slovak Republic) | 001-234-203-0635x76146 |\n\nProgram exited.\n```\n\n## Configuration Options\n\nThe program offers a range of different configuration options to customize the tool to best fit your use case.\n\n| Option                           | Type               | What does it do? |\n| -------------------------------- | ------------------ | ---------------- |\n| Align                            | Align              | Align the text on the rendered table. Visual feedback on the markdown syntax is also provided. |\n| Caption                          | string             | Set a caption for the table (will be rendered as an HTML comment above the table). |\n| Compact                          | bool               | Set whether the Markdown table be converted to compact syntax. |\n| CSVReaderConfig                  | CSVReaderConfig    | Config options to be passed into CSV reader object. See [type Reader in the encoding/csv module](https://pkg.go.dev/encoding/csv#Reader). |\n| CSVReaderConfig.Comma            | rune               | Set the delimiter of the CSV reader. |\n| CSVReaderConfig.Comment          | rune               | Set the comment character for the CSV reader. |\n| CSVReaderConfig.FieldsPerRecord  | int                | Set the amount of fields per CSV row. |\n| CSVReaderConfig.LazyQuotes       | bool               | Set whether lazy quotes are allowed. If lazy quotes are allowed, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field. |\n| CSVReaderConfig.TrimLeadingSpace | bool               | Set whether leading space before the fields' values should be ignored. |\n| CSVReaderConfig.ReuseRecord      | bool               | Set whether calls to Read may return a slice sharing the backing array of the previous call's returned slice for performance. By default, each call to Read returns newly allocated memory owned by the caller. |\n| ExcludedColumns                  | []string           | Set the list of columns that should be ignored when constructing the table. |\n| SortColumns                      | ColumnSortOption   | Should the columns be sorted and how? |\n| SortFunction                     | ColumnSortFunction | How should the columns be sorted? *This option will be ignored if SortColumns is not set to `Custom`.* |\n| VerboseLogging                   | bool               | Log detailed diagnostic messages when running the program. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphamduylong%2Fcsv2mdtable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphamduylong%2Fcsv2mdtable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphamduylong%2Fcsv2mdtable/lists"}