Skip to main content

No project description provided

Project description

EzMarkdownParser

EzMarkdownParser is a very simple Python package that converts Markdown text to HTML strings with its htmlify function. It is designed to handle basic Markdown elements such as paragraphs, headings, list items, bold text, and links.

This parser was made for cs50w project #1 Wiki on 2024, so it only supports the tags required by the project specifications, wich are mentioned above.

Installation

Install EzMarkdownParser using pip:

pip install ez-markdown-parser

Usage

from ez_markdown_parser import EzMarkdownParser

md_text = """
# Heading 1
This is a paragraph with some **bold text** and a [link](https://example.com).

## Heading 2
- List item 1
- List item 2
"""

parser = EzMarkdownParser()
html_text = parser.htmlify(md_text)
print(html_text)

Features

  • Convert Markdown headings to HTML <h1> to <h6> tags.
  • Process list items (* and -) and convert them to HTML <li> tags.
  • Wrap paragraphs with HTML <p> tags.
  • Recognize and convert double asterisk (**) for bold text.
  • Recognize and convert links in the format [text](URL).

Limitations

  • The parser is not complete nor optimized yet, it doesnt support advanced markdown features. Use it with caution.

Contributing

Contributions are welcome, as long as the project remains fun enough! If you find an issue or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is dedicated to the public domain. You are free to use, modify, and distribute the code without any restrictions. See the UNLICENSE file for more details.

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

ez_markdown_parser-0.0.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ez_markdown_parser-0.0.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file ez_markdown_parser-0.0.3.tar.gz.

File metadata

  • Download URL: ez_markdown_parser-0.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for ez_markdown_parser-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b09cf4ffea3e6d56ccde3795f396185496ad964e1f3e082d5f4acaf823201bf2
MD5 792e0990ef055568bf22a3b0cd699b8f
BLAKE2b-256 3afbcd9ec39fbb7f2dd6fd4914c7f0832399006646749a1c5e9fe472e4644d35

See more details on using hashes here.

File details

Details for the file ez_markdown_parser-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ez_markdown_parser-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 22608b33887fc725deaa76613f1a6219c0581950a873412784b25b3179872370
MD5 972ada2b034958120ca84e89781e6d9d
BLAKE2b-256 1468375b7d512e277d8496cad629375d3bfb039e5817092834b2963996feb6fc

See more details on using hashes here.

Supported by

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