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
File details
Details for the file yaml-to-markdown-0.1.1712460996.tar.gz
.
File metadata
- Download URL: yaml-to-markdown-0.1.1712460996.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c444f9104626170e37ed95518541b90c0841b0c18e42df80630df7bfc52e6c9 |
|
MD5 | 65190b182b5133da0b2a3e9f6fb36f2b |
|
BLAKE2b-256 | 055aa99760c02dcf5b979422815eb0f89f75d5c9bfd4eb5d5f81390d84c3c039 |
File details
Details for the file yaml_to_markdown-0.1.1712460996-py3-none-any.whl
.
File metadata
- Download URL: yaml_to_markdown-0.1.1712460996-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51aa4d5db8909bf6d4eb33a278ade3b22baed1ba0aa490669165590b96c1770c |
|
MD5 | 5da3218a3c7f6b61ca5c76592433772b |
|
BLAKE2b-256 | 4bc5b1a319ed5270ef6245fb7a5b93e422b86e7864124b40303709ba8ee3ee5a |