@opendataschema/table-schema-to-markdown

0.4.3 • Public • Published

Table Schema to Markdown

npm

Generate Markdown documentation from a Table Schema JSON file.

Note: For now Table Schemas specification doesn't define metadata properties. This project is based on this proposal.

Install

npm install -g @opendataschema/table-schema-to-markdown

Usage

A schema can be passed by file path or by URL. Examples:

table-schema-to-markdown schema.json
table-schema-to-markdown https://git.opendatafrance.net/scdl/subventions/raw/master/schema.json

By default, fields are rendered as headings, but it is possible to render them as a table:

table-schema-to-markdown --fields-format=table schema.json

The program reads your current locale to output translated messages, but it's possible to pass another locale:

LC_ALL=fr table-schema-to-markdown schema.json

Another Handlebars template file or partials directory can be passed also:

table-schema-to-markdown --template my_template.hbs --partials my_partials_dir schema.json

Example

For this schema, see this rendering.

Development

Install project with its dependencies:

git clone https://framagit.org/opendataschema/table-schema-to-markdown.git
cd table-schema-to-markdown
npm install

Use it:

node src/cli.js <schema.json>
LC_ALL=fr node src/cli.js <schema.json>
LC_ALL=fr node src/cli.js --template <template.hbs> <schema.json>

Maintenance

Publish a new version:

npm version X.Y.Z

Other implementations

Package Sidebar

Install

npm i @opendataschema/table-schema-to-markdown

Weekly Downloads

11

Version

0.4.3

License

MIT

Unpacked Size

59.1 kB

Total Files

22

Last publish

Collaborators

  • cbenz