Package Exports
- tablemark-cli
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tablemark-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
tablemark-cli ·

Generate markdown tables from JSON data at the command line.
Parse JSON input data into a markdown table from the command line,
powered by the tablemark module.
features
This utility supports:
- JSON file input from a provided path
- data piped from
stdin - NDJSON formatted data (newline delimited JSON).
installation
npm i -g tablemark-cliusage
Usage: tablemark <input-file> > <output-file> [options]
Commands:
help Display help
Options:
-a, --align <list> List of alignment types, applied in order to columns. (defaults to [])
-c, --columns <list> List of column names, defaults to object keys. (defaults to [])
-h, --help Output usage information
-v, --version Output the version numberTo use the align and column options, you can use the -a or
-c flags multiple times, like this:
tablemark input.json > output.md -a left -a center... which will align the first two columns left and center respectively.
stdin
tablemark < input.json > output.mdndjson
NDJSON is a form of JSON that delimits multiple JSON objects by newlines:
{"name":"trilogy","repo":"[citycide/trilogy](https://github.com/citycide/trilogy)","desc":"No-hassle SQLite with type-casting schema models and support for native & pure JS backends."}
{"name":"strat","repo":"[citycide/strat](https://github.com/citycide/strat)","desc":"Functional-ish JavaScript string formatting, with inspirations from Python."}
{"name":"tablemark-cli","repo":"[citycide/tablemark-cli](https://github.com/citycide/tablemark-cli)","desc":"Generate markdown tables from JSON data at the command line."}This input from a file or stdin is supported just as if it were a JSON compatible array:
tablemark input.ndjson > output.mdsee also
tablemark: the module used by this utility
contributing
Search the issues if you come across any trouble, open a new one if it hasn't been posted, or, if you're able, open a pull request. Contributions of any kind are welcome in this project.
The following people have already contributed their time and effort:
- Thomas Jensen (@tjconcept)
Thank you!
license
MIT © Bo Lingen / citycide