table-schema-to-markdown


Nametable-schema-to-markdown JSON
Version 0.4.12 PyPI version JSON
download
home_pagehttps://github.com/geoffreyaldebert/table-schema-to-markdown
SummaryGenerate Markdown documentation from a table schema file from Frictionless Data
upload_time2024-05-16 08:46:50
maintainerNone
docs_urlNone
authorAntoine Augusti, Geoffrey Aldebert
requires_python<4,>=3
licenseMIT
keywords frictionlessdata documentation tableschema table-schema frictionless data open data json schema json table schema data package tabular data package
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/AntoineAugusti/table-schema-to-markdown/blob/master/LICENSE.md)
![CircleCI](https://img.shields.io/circleci/project/github/AntoineAugusti/table-schema-to-markdown.svg?style=flat-square)
![PyPI](https://img.shields.io/pypi/v/table-schema-to-markdown.svg?style=flat-square)
![PyPI Python version](https://img.shields.io/pypi/pyversions/table-schema-to-markdown.svg?style=flat-square)

# Table Schema to Markdown
Create a Markdown documentation file from a [Table Schema file](https://frictionlessdata.io/specs/table-schema/).

The original scripts are coming from [doc-generator](https://git.opendatafrance.net/scdl/doc-generator) for the [Validata](https://validata.fr/) project, which are now available as [an npm package](https://www.npmjs.com/package/@opendataschema/table-schema-to-markdown).

## Installation
```
pip install table-schema-to-markdown
```

## Usage
### Command line tool
The package provides a command line tool.
```
$ table-schema-to-md -h
usage: table-schema-to-md [-h] [-o OUTPUT] [--log LOG] table_schema

positional arguments:
  table_schema          path or URL of table schema file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output file name
  --log LOG             level of logging messages
```

Example:
```sh
# Print generated Markdown
table-schema-to-md schema.json
# Save to Markdown file
table-schema-to-md schema.json -o documentation.md
```

### In Python
```python
from table_schema_to_markdown import convert_source

# Generate a Markdown documentation from a JSON file
table_schema = '/tmp/schema.json'
with open('/tmp/doc.md', 'a') as out:
    convert_source(table_schema, out)

# Generate Markdown documentation in a string
import io

with io.StringIO() as buff:
    convert_source(table_schema, buff)
    documentation = buff.getvalue()
```

## Generated documentation example
[This table schema file](tests/files/repertoire.json) is rendered in Markdown in [this file](tests/files/expected_repertoire.md).

Find a generated documentation file below.

## Métadonnées d'un répertoire Git

- Auteur : Antoine Augusti <antoine.augusti@example.com>
- Schéma créé le : 12/31/18
- Site web : https://github.com/AntoineAugusti/data-codes-sources-fr
- Clé primaire : `repertoire_url`

### Modèle de données

|Nom|Type|Description|Exemple|Propriétés|
|-|-|-|-|-|
|nom|chaîne de caractères|Le nom du répertoire|nom-repertoire|Valeur obligatoire|
|organisation_nom|chaîne de caractères|Le nom de l'organisation|etalab|Valeur obligatoire|
|plateforme|chaîne de caractères|La plateforme de dépôt de code|GitHub|Valeur obligatoire, Valeurs autorisées : GitHub|
|repertoire_url|chaîne de caractères (format `uri`)|L'URL vers le répertoire|https://github.com/etalab/nom-repertoire|Valeur obligatoire|
|description|chaîne de caractères|La description du répertoire|Ce répertoire est utile|Valeur optionnelle|
|est_fork|booléen|Indique si le répertoire est un fork|false|Valeur obligatoire|
|date_creation|date et heure|La date de création du répertoire|2018-12-01T20:00:55Z|Valeur obligatoire|
|derniere_mise_a_jour|date et heure|La date de dernière mise à jour du répertoire|2018-12-01T20:00:55Z|Valeur obligatoire|
|page_accueil|chaîne de caractères|URL vers la page d'accueil du projet|https://etalab.gouv.fr|Valeur optionnelle|
|nombre_stars|nombre entier|Le nombre de fois où le répertoire a été ajouté aux favoris|42|Valeur obligatoire, Valeur minimale : 0|
|nombre_forks|nombre entier|Le nombre de fois où le répertoire a été forké|13|Valeur obligatoire, Valeur minimale : 0|
|licence|chaîne de caractères|La licence du répertoire, telle que détectée par la plateforme|MIT|Valeur optionnelle|
|nombre_issues_ouvertes|nombre entier|Le nombre d'issues actuellement ouvertes|0|Valeur obligatoire, Valeur minimale : 0|
|langage|chaîne de caractères|Le langage principal du répertoire, tel que détecté par la plateforme|Python|Valeur optionnelle|
|topics|chaîne de caractères|Les tags du répertoire|utile,france,opendata|Valeur optionnelle|

## Notice
This software is available under the MIT license.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/geoffreyaldebert/table-schema-to-markdown",
    "name": "table-schema-to-markdown",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3",
    "maintainer_email": null,
    "keywords": "frictionlessdata, documentation, tableschema, table-schema, frictionless data, open data, json schema, json table schema, data package, tabular data package",
    "author": "Antoine Augusti, Geoffrey Aldebert",
    "author_email": "hi@antoine-augusti.fr, geoffrey.aldebert@data.gouv.fr",
    "download_url": null,
    "platform": null,
    "description": "[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/AntoineAugusti/table-schema-to-markdown/blob/master/LICENSE.md)\n![CircleCI](https://img.shields.io/circleci/project/github/AntoineAugusti/table-schema-to-markdown.svg?style=flat-square)\n![PyPI](https://img.shields.io/pypi/v/table-schema-to-markdown.svg?style=flat-square)\n![PyPI Python version](https://img.shields.io/pypi/pyversions/table-schema-to-markdown.svg?style=flat-square)\n\n# Table Schema to Markdown\nCreate a Markdown documentation file from a [Table Schema file](https://frictionlessdata.io/specs/table-schema/).\n\nThe original scripts are coming from [doc-generator](https://git.opendatafrance.net/scdl/doc-generator) for the [Validata](https://validata.fr/) project, which are now available as [an npm package](https://www.npmjs.com/package/@opendataschema/table-schema-to-markdown).\n\n## Installation\n```\npip install table-schema-to-markdown\n```\n\n## Usage\n### Command line tool\nThe package provides a command line tool.\n```\n$ table-schema-to-md -h\nusage: table-schema-to-md [-h] [-o OUTPUT] [--log LOG] table_schema\n\npositional arguments:\n  table_schema          path or URL of table schema file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o OUTPUT, --output OUTPUT\n                        Output file name\n  --log LOG             level of logging messages\n```\n\nExample:\n```sh\n# Print generated Markdown\ntable-schema-to-md schema.json\n# Save to Markdown file\ntable-schema-to-md schema.json -o documentation.md\n```\n\n### In Python\n```python\nfrom table_schema_to_markdown import convert_source\n\n# Generate a Markdown documentation from a JSON file\ntable_schema = '/tmp/schema.json'\nwith open('/tmp/doc.md', 'a') as out:\n    convert_source(table_schema, out)\n\n# Generate Markdown documentation in a string\nimport io\n\nwith io.StringIO() as buff:\n    convert_source(table_schema, buff)\n    documentation = buff.getvalue()\n```\n\n## Generated documentation example\n[This table schema file](tests/files/repertoire.json) is rendered in Markdown in [this file](tests/files/expected_repertoire.md).\n\nFind a generated documentation file below.\n\n## M\u00e9tadonn\u00e9es d'un r\u00e9pertoire Git\n\n- Auteur : Antoine Augusti <antoine.augusti@example.com>\n- Sch\u00e9ma cr\u00e9\u00e9 le : 12/31/18\n- Site web : https://github.com/AntoineAugusti/data-codes-sources-fr\n- Cl\u00e9 primaire\u00a0: `repertoire_url`\n\n### Mod\u00e8le de donn\u00e9es\n\n|Nom|Type|Description|Exemple|Propri\u00e9t\u00e9s|\n|-|-|-|-|-|\n|nom|cha\u00eene de caract\u00e8res|Le nom du r\u00e9pertoire|nom-repertoire|Valeur obligatoire|\n|organisation_nom|cha\u00eene de caract\u00e8res|Le nom de l'organisation|etalab|Valeur obligatoire|\n|plateforme|cha\u00eene de caract\u00e8res|La plateforme de d\u00e9p\u00f4t de code|GitHub|Valeur obligatoire, Valeurs autoris\u00e9es\u00a0: GitHub|\n|repertoire_url|cha\u00eene de caract\u00e8res (format `uri`)|L'URL vers le r\u00e9pertoire|https://github.com/etalab/nom-repertoire|Valeur obligatoire|\n|description|cha\u00eene de caract\u00e8res|La description du r\u00e9pertoire|Ce r\u00e9pertoire est utile|Valeur optionnelle|\n|est_fork|bool\u00e9en|Indique si le r\u00e9pertoire est un fork|false|Valeur obligatoire|\n|date_creation|date et heure|La date de cr\u00e9ation du r\u00e9pertoire|2018-12-01T20:00:55Z|Valeur obligatoire|\n|derniere_mise_a_jour|date et heure|La date de derni\u00e8re mise \u00e0 jour du r\u00e9pertoire|2018-12-01T20:00:55Z|Valeur obligatoire|\n|page_accueil|cha\u00eene de caract\u00e8res|URL vers la page d'accueil du projet|https://etalab.gouv.fr|Valeur optionnelle|\n|nombre_stars|nombre entier|Le nombre de fois o\u00f9 le r\u00e9pertoire a \u00e9t\u00e9 ajout\u00e9 aux favoris|42|Valeur obligatoire, Valeur minimale\u00a0: 0|\n|nombre_forks|nombre entier|Le nombre de fois o\u00f9 le r\u00e9pertoire a \u00e9t\u00e9 fork\u00e9|13|Valeur obligatoire, Valeur minimale\u00a0: 0|\n|licence|cha\u00eene de caract\u00e8res|La licence du r\u00e9pertoire, telle que d\u00e9tect\u00e9e par la plateforme|MIT|Valeur optionnelle|\n|nombre_issues_ouvertes|nombre entier|Le nombre d'issues actuellement ouvertes|0|Valeur obligatoire, Valeur minimale\u00a0: 0|\n|langage|cha\u00eene de caract\u00e8res|Le langage principal du r\u00e9pertoire, tel que d\u00e9tect\u00e9 par la plateforme|Python|Valeur optionnelle|\n|topics|cha\u00eene de caract\u00e8res|Les tags du r\u00e9pertoire|utile,france,opendata|Valeur optionnelle|\n\n## Notice\nThis software is available under the MIT license.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Generate Markdown documentation from a table schema file from Frictionless Data",
    "version": "0.4.12",
    "project_urls": {
        "Homepage": "https://github.com/geoffreyaldebert/table-schema-to-markdown"
    },
    "split_keywords": [
        "frictionlessdata",
        " documentation",
        " tableschema",
        " table-schema",
        " frictionless data",
        " open data",
        " json schema",
        " json table schema",
        " data package",
        " tabular data package"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b82bac9dc5d5c4ec7daadd5724d9074c7f03a9e12f8e1b319c3916b12c0d0498",
                "md5": "10d245de0c992c2606b5cc9a806842b7",
                "sha256": "7487eb5b0bb3c7efbc2a15cb3eeaea2f84e70d2d79850b2b10fa817c83ea9c9d"
            },
            "downloads": -1,
            "filename": "table_schema_to_markdown-0.4.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "10d245de0c992c2606b5cc9a806842b7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3",
            "size": 8746,
            "upload_time": "2024-05-16T08:46:50",
            "upload_time_iso_8601": "2024-05-16T08:46:50.224505Z",
            "url": "https://files.pythonhosted.org/packages/b8/2b/ac9dc5d5c4ec7daadd5724d9074c7f03a9e12f8e1b319c3916b12c0d0498/table_schema_to_markdown-0.4.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 08:46:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geoffreyaldebert",
    "github_project": "table-schema-to-markdown",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "table-schema-to-markdown"
}
        
Elapsed time: 0.30395s