vanyakosmos / argser

Arguments parsing without boilerplate.
https://argser.readthedocs.io/en/stable/
15 stars 0 forks source link

descriptions from function or class docstrings #24

Open thautwarm opened 4 years ago

thautwarm commented 4 years ago
def f():
    """
    <doc>
    """

call(f)

Above code shall (pretty) print the docstring when using -h option.

Also I wonder if you'd support markdown rendering, and more customizable stuffs including pygments and custom renderers.

vanyakosmos commented 4 years ago

markdown rendering, and more customizable stuffs including pygments and custom renderers

Can you provide some examples?

thautwarm commented 4 years ago

Some wonderful examples in python-prompt-toolkits: https://python-prompt-toolkit.readthedocs.io/en/master/pages/printing_text.html#html

You now can certainly use some markdown rendering package to convert them into HTML, and use some HTML to terminal text styler to make a good-looking raw text output.

However I think as an argument parsing library, we'd better keep performant. You'd better writing some simpler and faster parsers and transformers to render markdown/pygments.