Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

descriptions from function or class docstrings #24

Open
thautwarm opened this issue Feb 16, 2020 · 2 comments
Open

descriptions from function or class docstrings #24

thautwarm opened this issue Feb 16, 2020 · 2 comments

Comments

@thautwarm
Copy link

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
Copy link
Owner

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

Can you provide some examples?

@thautwarm
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants