Skip to main content

Make Markdown Documents

Project description

mkmd

Make Markdown Documents in Python.

Features

  • Heading
  • Paragraph
  • Code Block
  • Horizontal Rule
  • Reference
  • Image
  • Unordered List
  • Ordered List

Installation

pip install mkmd

Basic Usage

import mkmd
from mkmd.utils import *

md = mkmd.Markdown()

(md
    .add_heading(f"Hello {bold_and_italic('MKMD')}",)
    
    .add_paragraph(f"""
        This markdown document was generated by using
        {refer('mkmd', '1')}. This is a quick example showing how to
        use it:
    """, wrapped = True)
    
    .add_codeblock("""
        import mkmd
        
        md = mkmd.Markdown()
        md.add_heading("Hello World")
        md.add_paragraph("Lorem ipsum dolor sit amet.")
    """, language = "python")
    
    .add_ordered_list(
        *"So many things are possible!".split()
    )
    
    .add_reference("1", "http://example.org", "Look at this")
    
    .add_image("Linux Mascot",
        "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100"
    )
)

if __name__ == "__main__":
    md.save("example_result.md")

Links

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

mkmd-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

mkmd-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file mkmd-0.0.1.tar.gz.

File metadata

  • Download URL: mkmd-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for mkmd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 216647915b615d78e137caf5466c2dc4328415ed222cf0de5fde875c47103f38
MD5 152a29c7d7ac4b18320a67f2e7f9627f
BLAKE2b-256 724326c859023059502971636b7832f5094243803f0a39a1b217901b1f4129a1

See more details on using hashes here.

File details

Details for the file mkmd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mkmd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for mkmd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eecf57bd69e2ec7bf9f610a1e8645af1ed09f8ce8267115209bfab22a909a247
MD5 2af3af4d3f7fef1ba2d550f5b038cec1
BLAKE2b-256 ef05768ba613fb52f5f296ec95d3a64210e744ef45ed3560c03aa76bf4e7e608

See more details on using hashes here.

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