Write Markdown in Pythonic way
Project description
Python Markdown Maker
Python Objects for Markdown
Python Markdown maker use to write markdown documents in the Pythonic wayInstallation
$ git clone https://github.com/yogeshwaran01/python-markdown-maker/
$ cd python-markdown-maker/
$ python3 setup.py install
Usage
Elements | Normal Markdown | Pythonic Markdown |
---|---|---|
Headings | ## Python |
headers('Python', level=3) |
Images | ![alt](source) |
image(src, alt) |
Links | [text](link) |
links(link, text) |
Bold | **Bold** |
styled_text(text, bold=True) |
Italic | *Italic* |
styled_text(text, italic=True) |
Striketrough | ~~text~~ |
styled_text(text, strikethrough=True |
Inline code | some code |
inline_code("some code") |
Blackquotes | > text are super |
blockquotes('text are super') |
Code Blocks
code_block("print('Hello World!')", lang='python')
UnOrdered List
lists(['Python', 'Javascript', 'Go', 'PhP'])
- Python
- Javascript
- Go
- PhP
Ordered List
lists(['order', 'Python', 'Javascript', 'Go', 'PhP'])
1. Python
2. Javascript
3. Go
4. PhP
Both Ordered & Unorder list
lists([
'Frontend',[
'order', 'Html', 'Css', 'Javascript'
],
'Backend',[
'order', 'Python', 'Postgress'
]
])
- Frontend 1. Html 2. Css 3. Javascript
- Backend 1. Python 2. Postgress
Tables
t = Table(["Languages", "Uses"])
t.add_item("Python", "ML/AI")
t.add_item("Javascript", "Web Dev")
table = t.render()
Languages | Uses
--------- | ----
Python | ML/AI
Javascript | Web Dev
Rendering
from python_markdown_maker import *
ou = lists([
'Frontend',[
'order', 'Html', 'Css', 'Javascript'
],
'Backend',[
'order', 'Python', 'Postgress'
]
])
t = Table(["Languages", "Uses"])
t.add_item(["Python", "ML/AI"])
t.add_item(["Javascript", "Web Dev"])
table = t.render()
items = lists(['order', 'Python', 'Javascript', 'Go', 'PhP'])
md = Document()
md.write([ou, table, items])
with open('code.md', 'w') as file:
md.render.save_as_md(file)
# md.render.save_as_html(file)
# md.render.to_html()
# md.render.text
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 python-markdown-maker-1.0.tar.gz
.
File metadata
- Download URL: python-markdown-maker-1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42072f0faecf3379d1602a20836569b83b4cda672a27002c15861e47f36f9ad1 |
|
MD5 | 0575a9c2b26f15d80c6a102c72077843 |
|
BLAKE2b-256 | 07c90589649a9b436f95d85adef02cb0ee0aeb2ffae10ac8208a3e02e6bfc4af |
File details
Details for the file python_markdown_maker-1.0-py3-none-any.whl
.
File metadata
- Download URL: python_markdown_maker-1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07be11544f2d3686853c1f65c22005491a4ef8023fe61a321039bcdecc9f7e4 |
|
MD5 | 422af8e2e0019f605caefadae879fb84 |
|
BLAKE2b-256 | 419a1a51860c51f8c2d2ae15cb597b9c8a00ebe0f453f1e9a5ec8b9b9b3ed219 |