Converts a YAML/JSON file or python Dict/List to a Markdown file
Project description
YAML to Markdown Converter
A Python utility to take a JSON / YAML file or a python dict / list and create a Markdown file.
Usage
In Python Code example:
Convert a Pyton dictionary to Markdown:
from yaml_to_markdown.md_converter import MDConverter
data = {
"name": "John Doe",
"age": 30,
"city": "Sydney",
"hobbies": ["reading", "swimming"],
}
converter = MDConverter()
with open("output.md", "w") as f:
converter.convert(data, f)
Content of output.md
file will be:
## Name
John Doe
## Age
30
## City
Sydney
## Hobbies
* reading
* swimming
From the Command Line
You can also use the command line interface to convert a JSON or YAML file to Markdown. Here's an example:
Convert a JSON file to Markdown:
yaml-to-markdown --output-file output.md --json-file test.json
Convert a YAML file to Markdown:
yaml-to-markdown --output-file output.md --yaml-file test.yaml
Developer Guide
Please see the DEVELOPER.md file for more information on how to contribute to this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for yaml-to-markdown-0.1.1712383579.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bebb14e40c20cadb49f0dc9ab76dc9aff3d29b63edecfbcc3e63b3f990d1027b |
|
MD5 | 3c731a939b5c9ff0e7fd9acfa27f3556 |
|
BLAKE2b-256 | ae75542d222f45213bd070528d6d76a3f0ed3ff0b26443f90dab3da891d73865 |
Close
Hashes for yaml_to_markdown-0.1.1712383579-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a0e3ce4ba4fcd5d275e78e530d80aa5fc10d9f19f8b51e95c333c5cb1dc031f |
|
MD5 | deb44fd8b86608da1ce244ccb607b9a6 |
|
BLAKE2b-256 | c6fcad0ac6076cf6b4e7fe54c8b299ee6e4b1145ba91ddc318ab2701374f5dd5 |