qmd

Basic qmd generation helpers (experimental)

source

meta


def meta(
    md, # Markdown to add meta to
    classes:NoneType=None, # List of CSS classes to add
    style:NoneType=None, # Dict of CSS styles to add
    kwargs:VAR_KEYWORD
):

A metadata section for qmd div in {}


source

div


def div(
    txt, # Markdown to add meta to
    classes:NoneType=None, # List of CSS classes to add
    style:NoneType=None, # Dict of CSS styles to add
    kwargs:VAR_KEYWORD
):

A qmd div with optional metadata section


source

img


def img(
    fname, # Image to link to
    classes:NoneType=None, # List of CSS classes to add
    style:NoneType=None, # Dict of CSS styles to add
    height:NoneType=None, # Height attribute
    relative:NoneType=None, # Tuple of (position,px)
    link:bool=False, # Hyperlink to this image
    kwargs:VAR_KEYWORD
):

A qmd image


source

btn


def btn(
    txt, # Button text
    link, # Button link URL
    classes:NoneType=None, # List of CSS classes to add
    style:NoneType=None, # Dict of CSS styles to add
    kwargs:VAR_KEYWORD
):

A qmd button


source

tbl_row


def tbl_row(
    cols:list, # Auto-stringified columns to show in the row
):

Create a markdown table row from cols


source

tbl_sep


def tbl_sep(
    sizes:int \| list=3, # List of column sizes, or single `int` if all sizes the same
):

Create a markdown table separator with relative column size sizes