euporie.core.convert.formats.ansi

Contain functions which convert data to formatted ansi text.

Functions

call_subproc(data, cmd[, use_tempfile, suffix])

Call the command as a subprocess and return it's output as bytes.

ceil(x, /)

Return the ceiling of x as an Integral.

chafa_convert_cmd(output_format, datum[, ...])

Convert image data to ANSI text using chafa.

chafa_convert_py(output_format, datum[, ...])

Convert image data to ANSI text using ::chafa.py.

command_exists(*cmds)

Verify a list of external commands exist on the system.

get_app()

Get the current active (running) Application.

have_modules(*modules)

Verify a list of python modules are importable.

html_to_ansi_elinks(datum[, cols, rows, fg, ...])

Convert HTML text to formatted ANSI using elinks.

html_to_ansi_links(datum[, cols, rows, fg, ...])

Convert HTML text to formatted ANSI using links.

html_to_ansi_lynx(datum[, cols, rows, fg, ...])

Convert HTML text to formatted ANSI using lynx.

html_to_ansi_py_htmlparser(datum[, cols, ...])

Convert HTML tables to ANSI text using HTMLParser.

html_to_ansi_w3m(datum[, cols, rows, fg, ...])

Convert HTML text to formatted ANSI using w3m.

image_to_ansi_catimg(datum[, cols, rows, ...])

Convert image data to ANSI text using catimg.

image_to_ansi_icat(datum[, cols, rows, fg, ...])

Convert image data to ANSI text using icat.

image_to_ansi_jp2a(datum[, cols, rows, fg, ...])

Convert image data to ANSI text using jp2a.

image_to_ansi_timg(datum[, cols, rows, fg, ...])

Convert image data to ANSI text using timg.

image_to_ansi_tiv(datum[, cols, rows, fg, ...])

Convert image data to ANSI text using tiv.

image_to_ansi_viu(datum[, cols, rows, fg, ...])

Convert image data to ANSI text using viu.

latex_to_ansi_py_flatlatex(datum[, cols, ...])

Convert LaTeX to ANSI using flatlatex.

latex_to_ansi_py_pylatexenc(datum[, cols, ...])

Convert LaTeX to ANSI using pylatexenc.

latex_to_ansi_py_sympy(datum[, cols, rows, ...])

Convert LaTeX to ANSI using sympy.

latex_to_ansi_utftex(datum[, cols, rows, ...])

Render LaTeX maths as unicode.

pil_to_ansi_py_img2unicode(datum[, cols, ...])

Convert a PIL image to ANSI text using img2unicode.

pil_to_ansi_py_timg(datum[, cols, rows, fg, ...])

Convert a PIL image to ANSI text using timg.

png_to_ansi_img2txt(datum[, cols, rows, fg, ...])

Convert PNG data to ANSI text using img2txt.

png_to_ansi_py_placeholder(datum[, cols, ...])

Draw placeholder ANSI text.

register(from_, to[, filter_, weight])

Add a converter to the centralized format conversion system.

rich_to_ansi_py(datum[, cols, rows, fg, bg, ...])

Convert rich objects to formatted ANSI text.

set_background(image[, bg])

Remove the alpha channel from an image and set the background colour.

Classes

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

Convert HTML text to formatted ANSI using elinks.

Convert HTML text to formatted ANSI using links.

async euporie.core.convert.formats.ansi.html_to_ansi_lynx(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert HTML text to formatted ANSI using lynx.

async euporie.core.convert.formats.ansi.html_to_ansi_py_htmlparser(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert HTML tables to ANSI text using HTMLParser.

async euporie.core.convert.formats.ansi.html_to_ansi_w3m(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert HTML text to formatted ANSI using w3m.

async euporie.core.convert.formats.ansi.image_to_ansi_catimg(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using catimg.

async euporie.core.convert.formats.ansi.image_to_ansi_icat(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using icat.

async euporie.core.convert.formats.ansi.image_to_ansi_jp2a(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using jp2a.

async euporie.core.convert.formats.ansi.image_to_ansi_timg(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using timg.

async euporie.core.convert.formats.ansi.image_to_ansi_tiv(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using tiv.

async euporie.core.convert.formats.ansi.image_to_ansi_viu(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert image data to ANSI text using viu.

async euporie.core.convert.formats.ansi.latex_to_ansi_py_flatlatex(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert LaTeX to ANSI using flatlatex.

async euporie.core.convert.formats.ansi.latex_to_ansi_py_pylatexenc(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert LaTeX to ANSI using pylatexenc.

async euporie.core.convert.formats.ansi.latex_to_ansi_py_sympy(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert LaTeX to ANSI using sympy.

async euporie.core.convert.formats.ansi.latex_to_ansi_utftex(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Render LaTeX maths as unicode.

async euporie.core.convert.formats.ansi.pil_to_ansi_py_img2unicode(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert a PIL image to ANSI text using img2unicode.

async euporie.core.convert.formats.ansi.pil_to_ansi_py_timg(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert a PIL image to ANSI text using timg.

async euporie.core.convert.formats.ansi.png_to_ansi_img2txt(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert PNG data to ANSI text using img2txt.

async euporie.core.convert.formats.ansi.png_to_ansi_py_placeholder(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Draw placeholder ANSI text.

async euporie.core.convert.formats.ansi.rich_to_ansi_py(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) str

Convert rich objects to formatted ANSI text.