Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Convert a Markdown table to CSV

Goal: Turn a table in a doc into CSV, e.g. to pull it into a spreadsheet.

Prerequisites: The table module, via -A or nodes.

Query

$ mq -A 'import "table" | table::tables | first | table::to_csv' README.md

Input

| Name  | Age |
| ----- | --- |
| Alice | 30  |

Output

Name,Age
Alice,30

Notes