euporie.core.convert.datum
Convert display data between formats.
Functions
|
Get the current active (running) Application. |
|
Create or return the conversion IO loop. |
|
Returns a md5 hash object; optionally initialized with a string |
|
Turn any kind of formatted text back into plain text. |
Classes
|
Class for storing and converting display data. |
|
Abstract base class for generic types. |
|
|
Type variable. |
|
|
Mapping class that references values weakly. |
|
Alignment of the Window content. |
|
Class for finalization of weakrefable objects |
alias of |
- class euporie.core.convert.datum.Datum(data: T, *args: Any, **kwargs: Any)
Bases:
Generic
[T
]Class for storing and converting display data.
- async cell_size_async() tuple[int, float]
Get the cell width and aspect ratio of the displayable data.
- Returns:
- A tuple of the data’s width in terminal columns and its aspect ratio, when
converted to a image.
- convert(to: str, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) Any
Convert between formats.
- async convert_async(to: str, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True, bbox: DiInt | None = None) Any
Perform conversion asynchronously, caching the result.
- classmethod get_size(key: str) tuple[Datum, Size] | None
Retrieve a
Datum
and it’s size by its key.
- async pixel_size_async() tuple[int | None, int | None]
Get the dimensions of displayable data in pixels.
Foreground and background color are set at this point if they are available, as data conversion outputs are cached and re-used.
- Returns:
- A tuple of the data’s width in terminal columns and its aspect ratio, when
converted to a image.
- euporie.core.convert.datum.get_loop() AbstractEventLoop
Create or return the conversion IO loop.
The loop will be running on a separate thread.