#!/usr/bin/env python3
import importlib
from glob import glob
fl = list(glob("*.py"))
fl.sort()

print("## Examples")
print()
for f in fl:
    f = f[:-3]
    m = importlib.import_module(f)
    doc = m.__doc__.strip()
    if doc == None:
        doc = "MISSING\n"
    nl = doc.find('\n')
    if nl != -1:
        doc = doc[0:nl]

    print(f"* [{f}.py]({f}.py)\n    - ", doc)
    print()
