{"id":13425713,"url":"https://github.com/baig/pandoc-csv2table","last_synced_at":"2026-02-19T13:34:26.138Z","repository":{"id":31675873,"uuid":"35241399","full_name":"baig/pandoc-csv2table","owner":"baig","description":"A Pandoc filter that renders CSV as Pandoc Markdown Tables.","archived":false,"fork":false,"pushed_at":"2023-07-31T23:50:00.000Z","size":589,"stargazers_count":103,"open_issues_count":15,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-15T04:23:41.118Z","etag":null,"topics":["csv","pandoc","pandoc-filter"],"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/baig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-05-07T20:16:10.000Z","updated_at":"2025-11-28T22:06:18.000Z","dependencies_parsed_at":"2024-05-01T20:37:26.269Z","dependency_job_id":null,"html_url":"https://github.com/baig/pandoc-csv2table","commit_stats":null,"previous_names":["baig/pandoc-csv2table-filter"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/baig/pandoc-csv2table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baig%2Fpandoc-csv2table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baig%2Fpandoc-csv2table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baig%2Fpandoc-csv2table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baig%2Fpandoc-csv2table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baig","download_url":"https://codeload.github.com/baig/pandoc-csv2table/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baig%2Fpandoc-csv2table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29614980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","pandoc","pandoc-filter"],"created_at":"2024-07-31T00:01:17.200Z","updated_at":"2026-02-19T13:34:26.115Z","avatar_url":"https://github.com/baig.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# Pandoc csv2table Filter\n\n[![Build Status](https://travis-ci.org/vmandela/pandoc-csv2table.svg?branch=master)](https://travis-ci.org/vmandela/pandoc-csv2table)\n\nA Pandoc filter that replaces CSV content (either inside fenced code blocks or referenced CSV files) with\n[Pandoc Table Markdown][tables].\n\n![A CSV file rendered to Markdown and PDF][png]\n\n[png]: Examples/demo.png\n\n## Installation\n\nYou can use this filter in two ways.\n\n1.  **Install using Cabal:** After installing Haskell platform, run:\n\n    \u003e ```\n    \u003e cabal install pandoc-csv2table\n    \u003e ```\n    \n2.  **Use the single file filter:** There is a gist hosting a single file\n    version of this filter [here][gist]. Clone it and make it an executable script by\n    running:\n    \n    \u003e ```\n    \u003e chmod +x pandoc-csv2table.hs\n    \u003e ```\n    \n[gist]: https://gist.github.com/baig/b69e3146251bd90d12e7\n\nYou can also use this filter in your Pandoc application by calling\n`tablifyCsvlinks`.\n\n## Usage\n\n### Referencing or including CSV\n\nThere are three ways to include CSV in your markdown.\n\n1.  **Referencing CSV file in Image Links:**\n\n    ```\n    ![This text will become the table caption](table.csv)\n    ```\n    \n2.  **Referencing CSV file in Fenced Code Blocks:**\n    \n        ```{.table caption=\"This is the **caption**\" source=\"table.csv\"}  \n        ```\n    \n    Only code blocks having `.table` class will be processed.\n    \n3.  **Including CSV content inside Fenced Code Blocks:**\n\n        ```{.table aligns=\"LCR\" caption=\"This is the **caption**\" header=\"yes\"}  \n        Fruit, Quantity, Price  \n        apples, 15, 3.24  \n        oranges, 12, 2.22  \n        ```\n\n    Only code blocks having `.table` class will be processed.\n\nCSV file or content can contain pandoc markdown. It will be parsed by the Pandoc Markdown\nReader before being inserted as a table into the document.\n\n### Running the filter\n\nGiven the filename `test.md`, run the filter using command\n\n    pandoc --filter pandoc-csv2table -o test.html test.md\n\nor\n\n    pandoc -t json test.md | pandoc-csv2table | pandoc -f json -o test.html\n\n## Examples\n\nSee [example.md][md] and the rendered [pdf][] version in the Examples folder\nfor more details on usage.\n\n[md]: Examples/example.md\n[pdf]: Examples/example.pdf\n\n## Options\n\nYou can specify a [configuration string][cfg] for image links and\n[attributes][atr] for fenced code blocks. There are valid options for specifying\n\n-   Type of the table\n-   Column alignments\n-   Whether to treat the first line of the CSV file as header or not\n\n[cfg]: README.md#configuration-string\n[atr]: README.md#attributes\n\n### Configuration String\n\nIt is included right before the closing square bracket **without any space in\nbetween**, as shown in the example below.\n\n\u003e \\!\\[Another table. mylrcd](table.csv)\n\n`mylrcd` is the configuration string.\nThis will be rendered as a **m**ultiline table with a header with first column\n**l**eft-aligned, second **r**ight-aligned, third **c**enter-aligned, and the\nfourth one having **d**efault alignment.\n***The config string will be removed from the caption after being processed.***\n\nThe config string can contain following letters:\n\n-   **`s`** for **s**imple table\n-   **`m`** for **m**ultiline table\n-   **`g`** for **g**rid table\n-   **`p`** for **p**ipe table\n-   **`y`** (from **y**es) when you want the first row of CSV file to be the\n    header.\n-   **`n`** (from **n**o) when you want to omit the header.\n-   **`l`** for **l**eft alignment of the column\n-   **`r`** for **r**ight alignment of the column\n-   **`c`** for **c**center alignment of the column\n-   **`d`** for **d**efault alignment of the column\n\nYou can specify `l` `r` `c` `d` for each column in a series.\nThe extra letters will be ignored if they exceed the number of columns in the\nCSV file.\n\n### Attributes\n\nYou can specify header attributes in fecnced code blocks like this:\n\n    ```{.table type=\"pipe\" aligns=\"LCR\" caption=\"A **caption**\" header=\"yes\"}  \n    Fruit, Quantity, Price  \n    apples, 15, 3.24  \n    oranges, 12, 2.22  \n    ```\n\n***Note: `.table` must be included if the fenced code block is intended to be\nprocessed by this filter.***\n\nValid attributes that you can specify in code blocks include:\n\n-   **type** of the table can be **`simple`**, **`multiline`**,\n    **`grid`** (default), or **`pipe`**.\n-   **header** can be `yes` (default) or `no`\n-   **caption** is a string which can contain markdown.\n-   **source** is the path to a valid CSV file to be rendered as pandoc table.\n    If present, the contents inside the fenced code blocks are ignored.\n-   **aligns** specify alignment for each column. Use **`L`** for left, **`R`**\n    for right, **`C`** for center, and **`D`** for default.\n\n## License\n\nCopyright \u0026copy; 2015-2023 [Wasif Hasan Baig](https://twitter.com/_wbaig),[Venkateswara Rao Mandela](https://vmandela.com)\n\nSource code is released under the Terms and Conditions of [MIT License](http://opensource.org/licenses/MIT).\n\nPlease refer to the [License file][license] in the project's root directory.\n\n[license]: LICENSE\n[tables]: http://pandoc.org/README.html#tables\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaig%2Fpandoc-csv2table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaig%2Fpandoc-csv2table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaig%2Fpandoc-csv2table/lists"}