How to use the handright._core._Renderer function in handright

To help you get started, we’ve selected a few handright examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Gsllchb / Handright / handright / _core.py View on Github external
`template` could be a Template instance or a Sequence of Template
    instances. If pass a Template Sequence, the inside Template instances will
    be applied cyclically to the output pages.

    `seed` could be used for reproducibility.

    A different implementation of map built-in function (only accept one
    Iterable though) could be passed to `mapper` to boost the page rendering
    process, e.g. `multiprocessing.Pool.map`.
    """
    if isinstance(template, Template):
        templates = (template,)
    else:
        templates = template
    pages = _draft(text, templates, seed)
    renderer = _Renderer(templates, seed)
    return mapper(renderer, pages)

handright

A lightweight Python library for simulating Chinese handwriting

BSD-3-Clause
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis

Similar packages