{"id":17041683,"url":"https://github.com/xlab/tablewriter","last_synced_at":"2025-04-12T14:33:52.032Z","repository":{"id":57482967,"uuid":"59521168","full_name":"xlab/tablewriter","owner":"xlab","description":"The platform-independent fork of Go ASCII Table Generator, ported from the Ruby terminal-tables library.","archived":false,"fork":false,"pushed_at":"2016-06-10T13:55:59.000Z","size":56,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T00:41:19.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlab.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":"2016-05-23T21:58:30.000Z","updated_at":"2024-10-24T04:47:22.000Z","dependencies_parsed_at":"2022-09-26T17:50:37.957Z","dependency_job_id":null,"html_url":"https://github.com/xlab/tablewriter","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/xlab%2Ftablewriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Ftablewriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Ftablewriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Ftablewriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlab","download_url":"https://codeload.github.com/xlab/tablewriter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239942758,"owners_count":19722330,"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-10-14T09:13:13.295Z","updated_at":"2025-02-21T15:33:52.580Z","avatar_url":"https://github.com/xlab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tablewriter\n\nThis is a legit fork of [apcera/termtables](https://github.com/apcera/termtables). This version is portable\nand does not rely on platform-dependent stuff like locale and term info.\n\nA [Go](http://golang.org) port of the Ruby library [terminal-tables](https://github.com/visionmedia/terminal-table) for fast and simple ASCII table generation.\n\n## Installation\n\n```bash\ngo get github.com/xlab/tablewriter\n```\n\n## Go Style Documentation\n\n[http://godoc.org/github.com/xlab/tablewriter](http://godoc.org/github.com/xlab/tablewriter)\n\n## Basic Usage\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/xlab/tablewriter\"\n)\n\nfunc main() {\n  table := tablewriter.CreateTable()\n\n  table.AddHeaders(\"Name\", \"Age\")\n  table.AddRow(\"John\", \"30\")\n  table.AddRow(\"Sam\", 18)\n  table.AddRow(\"Julie\", 20.14)\n\n  fmt.Println(table.Render())\n}\n```\n\nResult:\n\n```\n+-------+-------+\n| Name  | Age   |\n+-------+-------+\n| John  | 30    |\n| Sam   | 18    |\n| Julie | 20.14 |\n+-------+-------+\n```\n\n## Advanced Usage\n\nThe package function-call `EnableUTF8()` will cause any tables created after\nthat point to use Unicode box-drawing characters for the table lines.\n\nCalling `SetModeHTML(true)` will cause any tables created after that point\nto be emitted in HTML, while `SetModeMarkdown(true)` will trigger Markdown.\nNeither should result in changes to later API to get the different results;\nthe primary intended use-case is extracting the same table, but for\ndocumentation.\n\nThe table method `.AddSeparator()` inserts a rule line in the output.  This\nonly applies in normal terminal output mode.\n\nThe table method `.AddTitle()` adds a title to the table; in terminal output,\nthis is an initial row; in HTML, it's a caption.  In Markdown, it's a line of\ntext before the table, prefixed by `Table: `.\n\nThe table method `.SetAlign()` takes an alignment and a column number\n(indexing starts at 1) and changes all _current_ cells in that column to have\nthe given alignment.  It does not change the alignment of cells added to the\ntable after this call.  Alignment is only stored on a per-cell basis.\n\n## Known Issues\n\nNormal output:\n\n* `.SetAlign()` does not affect headers.\n\nMarkdown output mode:\n\n* When emitting Markdown, the column markers are not re-flowed if a vertical\n  bar is an element of a cell, causing an escape to take place; since Markdown\n  is often converted to HTML, this only affects text viewing.\n* A title in Markdown is not escaped against all possible forms of Markdown\n  markup (to avoid adding a dependency upon a Markdown library, as supported\n  syntax can vary).\n* Markdown requires headers, so a dummy header will be inserted if needed.\n* Table alignment is not reflected in Markdown output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Ftablewriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlab%2Ftablewriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Ftablewriter/lists"}