@task
def library_docs(ctx, name):
    'Generate standard library documentation.\n\n    Args:\n        name:  Name of the library or ``all`` to generate docs for all libs.\n               Name is case-insensitive and can be shortened as long as it\n               is a unique prefix. For example, ``b`` is equivalent to\n               ``BuiltIn`` and ``di`` equivalent to ``Dialogs``.\n    '
    libraries = ['BuiltIn', 'Collections', 'DateTime', 'Dialogs', 'OperatingSystem', 'Process', 'Screenshot', 'String', 'Telnet', 'XML']
    name = name.lower()
    if (name != 'all'):
        libraries = [lib for lib in libraries if lib.lower().startswith(name)]
        if (len(libraries) != 1):
            raise Exit(f"'{name}' is not a unique library prefix.")
    for lib in libraries:
        libdoc(lib, str(Path(f'doc/libraries/{lib}.html')))
Generate standard library documentation.

Args:
    name:  Name of the library or ``all`` to generate docs for all libs.
           Name is case-insensitive and can be shortened as long as it
           is a unique prefix. For example, ``b`` is equivalent to
           ``BuiltIn`` and ``di`` equivalent to ``Dialogs``.
@task
def library_docs(ctx, name):
    'Generate standard library documentation.\n\n    Args:\n        name:  Name of the library or ``all`` to generate docs for all libs.\n               Name is case-insensitive and can be shortened as long as it\n               is a unique prefix. For example, ``b`` is equivalent to\n               ``BuiltIn`` and ``di`` equivalent to ``Dialogs``.\n    '
    libraries = ['BuiltIn', 'Collections', 'DateTime', 'Dialogs', 'OperatingSystem', 'Process', 'Screenshot', 'String', 'Telnet', 'XML']
    name = name.lower()
    if (name != 'all'):
        libraries = [lib for lib in libraries if lib.lower().startswith(name)]
        if (len(libraries) != 1):
            raise Exit(f"'{name}' is not a unique library prefix.")
    for lib in libraries:
        libdoc(lib, str(Path(f'doc/libraries/{lib}.html')))