You can easily generate markdowns in python.
Project description
EasyMarkdown
Install
pip install EasyMarkdown
Usage
from EasyMarkdown import EasyMarkdown
markdown = EasyMarkdown()
markdown.add_Header(level=1, text="Hello")
markdown.add_Header(level=2, text="Hello")
markdown.add_CodeBlock(From="text", code_type="python", text='print("hello")')
markdown.save_file()
output.md
Hello
Hello
Hello
print("hello")
method
Name | Argument | Description |
---|---|---|
get_MD_text | self | Get the current markdown text |
save_file | self, fileName: str, root: str | Save markdown text in markdown format |
add_Header | self, level: Literal[1, 2, 3, 4, 5, 6], text: str | Add a header |
add_InlineCode | self, text: str | Add an inline code |
add_CodeBlock | self, From: Literal["text", "file"], code_type, text: str, file_path: str | Add a CodeBlock |
add_Link | self, title: str, URL: str | add a Link |
add_RawMarkdown | self, text: str | The text as is is reflected in the markdown |
add_Table | self, row: int, coumum: int, title: list[str], data: list | under development |
add_Image | self, path: str, alt: str | Add an image |
add_Line | self | add a line |
add_Comment | self, text: str | add a comment |
Exampl add_CodeBlock
from EasyMarkdown import EasyMarkdown
markdown = EasyMarkdown()
markdown.add_CodeBlock(From="file", code_type="python", file_path=file_path)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
EasyMarkdown-0.1.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for EasyMarkdown-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35314e4440933186acf21133c7b5717b1202f0b347ff46e1e3083120c5d342ef |
|
MD5 | bd3badd6b70c31aa59477cd6d154b29a |
|
BLAKE2b-256 | 99ff7d8f2e0e2892a458b3659a52a5aee54e499af6611f29e6a43a2d06c4414a |