{"id":19227344,"url":"https://github.com/quarto-dev/gridtables","last_synced_at":"2025-12-11T23:20:43.367Z","repository":{"id":47843344,"uuid":"513129630","full_name":"quarto-dev/gridtables","owner":"quarto-dev","description":"Haskell parser for reStructuredText-style grid tables.","archived":false,"fork":false,"pushed_at":"2024-01-25T09:16:07.000Z","size":54,"stargazers_count":4,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T20:46:39.936Z","etag":null,"topics":["pandoc","parser","quarto","rst"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/quarto-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["tarleb"]}},"created_at":"2022-07-12T12:17:10.000Z","updated_at":"2025-03-15T03:07:47.000Z","dependencies_parsed_at":"2024-01-25T11:01:27.295Z","dependency_job_id":"49ed2298-4cc3-4ac3-a7e3-0d29a5508ea2","html_url":"https://github.com/quarto-dev/gridtables","commit_stats":null,"previous_names":["tarleb/gridtables"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-dev%2Fgridtables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-dev%2Fgridtables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-dev%2Fgridtables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarto-dev%2Fgridtables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarto-dev","download_url":"https://codeload.github.com/quarto-dev/gridtables/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085475,"owners_count":21210267,"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":["pandoc","parser","quarto","rst"],"created_at":"2024-11-09T15:22:49.526Z","updated_at":"2025-12-11T23:20:43.278Z","avatar_url":"https://github.com/quarto-dev.png","language":"Haskell","readme":"# gridtables\n\nParser for reStructuredText-style grid tables.\n\nThis package provides a parser for plain-text representations of\ntables, like the one given below.\n\n```\n+---------------------+-----------------------+\n| Location            | Temperature 1961-1990 |\n|                     | in degree Celsius     |\n|                     +-------+-------+-------+\n|                     | min   | mean  | max   |\n+=====================+=======+=======+=======+\n| Antarctica          | -89.2 | N/A   | 19.8  |\n+---------------------+-------+-------+-------+\n| Earth               | -89.2 | 14    | 56.7  |\n+---------------------+-------+-------+-------+\n```\n\n## Character widths\n\nThe tables are intended to look good when viewed in a monospace\nfont. Therefore, wide and full-width characters, as those in East\nAsian scripts, are counted as two characters, while zero-width and\ncombining characters are treated as if they have no width.\n\n## Column alignments\n\nThe parser re-implements a table extensions from John MacFarlane's\npandoc, namely support for column-wide cell alignments. The\nalignment of cells is determined by placing colons in the row that\nseparates the table head from the body, like so:\n\n    +------+--------+-------+\n    | left | center | right |\n    +:=====+:======:+======:+\n    | 1    | 2      | 3     |\n    +------+--------+-------+\n\nThe first line must be used for headless tables:\n\n    +:-----+:------:+------:+\n    | left | center | right |\n    +------+--------+-------+\n    | a 1  | b 2    | c 3   |\n    +------+--------+-------+\n\n## Table Foot\n\nThis library implements an extension that enables to create tables\nwith table foots: If the *last* separator line is a part\nseparator, i.e., if it consists of `=` instead of `-`, then all\nrows after the *second-to-last* part separator are treated as the\ntable foot.\n\nE.g., consider the following table:\n\n    +------+-------+\n    | Item | Price |\n    +======+=======+\n    | Eggs | 5£    |\n    +------+-------+\n    | Spam | 3£    |\n    +======+=======+\n    | Sum  | 8£    |\n    +======+=======+\n\nHere, the last row, containing \"Sum\" and \"8£\", would be the table\nfoot.\n\n\n## Algorithm\n\nThe cell tracing algorithm used in this package has been\ntranslated from the original Python implementation for\nreStructuredText. The parser has been placed in the public domain.\n\n## Usage\n\nThe usual way to use this package will be to use it as part of a\nparsec parser:\n\n``` haskell\nmain :: IO ()\nmain = do\n  let gt = T.unlines\n           [ \"+------+--------+-------+\"\n           , \"| left | center | right |\"\n           , \"+:=====+:======:+======:+\"\n           , \"| 1    | 2      | 3     |\"\n           , \"+------+--------+-------+\"\n           ]\n  in print (runParser GT.gridTable () \"table\" gt)\n```\n\nUse `traceLines :: [Text] -\u003e Maybe (GridTable [Text])`, if the\ntable's raw lines have been retrieved in a different way.\n","funding_links":["https://github.com/sponsors/tarleb"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarto-dev%2Fgridtables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarto-dev%2Fgridtables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarto-dev%2Fgridtables/lists"}