Skip to main content

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)

Uploaded Source

Built Distribution

EasyMarkdown-0.1.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page