table-schema-to-markdown issueshttps://framagit.org/opendataschema/table-schema-to-markdown/-/issues2021-05-03T09:08:02Zhttps://framagit.org/opendataschema/table-schema-to-markdown/-/issues/4Compatibility with array type2021-05-03T09:08:02ZJohan RicherCompatibility with array typeThe `table-schema-to-markdown` library should be able to describe in a human-readable way the new possibilities with table schemas and multiple array values (see [here](https://github.com/frictionlessdata/frictionless-py/issues/759)).
S...The `table-schema-to-markdown` library should be able to describe in a human-readable way the new possibilities with table schemas and multiple array values (see [here](https://github.com/frictionlessdata/frictionless-py/issues/759)).
See schema [example](https://github.com/etalab/tableschema-template/blob/09f982c32ce2dc24153f5352b3f821ad07dc1032/schema.json#L81):
```
"name":"classification",
"description":"Classification de l'objet.",
"example":"Classification A",
"type":"array",
"arrayItem":{
"type": "string",
"constraints": {
"enum": ["Classification A", "Classification B", "Classification C"]
}
}
```
Documentation should be similar to classic enum constraint ([see schema example here](https://git.opendatafrance.net/scdl/subventions/-/blob/master/schema.json#L133) and [Markdown documentation here](https://scdl.opendatafrance.net/docs/schemas/subventions.html)).https://framagit.org/opendataschema/table-schema-to-markdown/-/issues/31-day difference in dates2020-04-20T16:32:45ZAntoine Augusti1-day difference in datesHello,
When generating the documentation, the creation date and the last modified date have a 1-day difference in the past compared to the `schema.json`.
Spotted in [this PR](https://github.com/etalab/schema-irve/pull/8), first two com...Hello,
When generating the documentation, the creation date and the last modified date have a 1-day difference in the past compared to the `schema.json`.
Spotted in [this PR](https://github.com/etalab/schema-irve/pull/8), first two commits.
Command used:
```
wget https://raw.githubusercontent.com/etalab/schema-irve/d691dfa53bc915c3ad3f5f25e8d1ddb6ddea1e0a/schema.json
npm install @opendataschema/table-schema-to-markdown
LC_ALL=fr npx table-schema-to-markdown schema.json > schema.md
```https://framagit.org/opendataschema/table-schema-to-markdown/-/issues/1TODO2019-02-07T16:42:30ZChristophe BenzTODOThis project aims to generate a Markdown documentation from a Table Schema JSON file.
Several attempts have been done:
- https://git.opendatafrance.net/validata/validata-doc-generator
- https://github.com/CharlesNepote/csv-schema-docume...This project aims to generate a Markdown documentation from a Table Schema JSON file.
Several attempts have been done:
- https://git.opendatafrance.net/validata/validata-doc-generator
- https://github.com/CharlesNepote/csv-schema-documentor
- https://github.com/AntoineAugusti/table-schema-to-markdown
Starting from discussions about strengths and weaknesses of each of them, here is a list of the needs:
- Be generic (not tied to the [Validata](https://git.opendatafrance.net/validata) project)
- Allow multiple outputs for fields doc generation: titles, table
- Allow custom content (i.e. before and after fields doc paragraph)
- Customize rendering (including i18n)
- Be usable without configuration
- Distribute it via https://pypi.org/
Technically, it implies:
- Using templates to generate Markdown
- A main template can include other ones: templates for fields doc and templates for the whole page can co-exist
- Templates can be bundled with the project (like fields doc with titles and table), others can be maintained and called by the user
- i18n can be achieved via templates
- Validata-specific text can be set via templates
Which template language?
- using Handlebars with [handlebars-cmd](https://www.npmjs.com/package/handlebars-cmd) (as suggested by [Charles](https://github.com/CharlesNepote/csv-schema-documentor)) would let us avoid writing a CLI
- otherwise [Jinja2](http://jinja.pocoo.org/docs/), quite standard in Python world, using [one](https://github.com/mattrobenolt/jinja2-cli) [of](https://github.com/kolypto/j2cli) [those](https://github.com/istrategylabs/shinto-cli) CLI tools