File: data.py

package info (click to toggle)
textual-image 0.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,468 kB
  • sloc: python: 1,851; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 548 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from importlib.util import find_spec
from pathlib import Path

from rich.console import ConsoleDimensions, ConsoleOptions

from textual_image._terminal import CellSize

TEXTUAL_ENABLED = bool(find_spec("textual"))

TEST_IMAGE = Path(__file__).parent.parent / "textual_image" / "gracehopper.jpg"

CELL_SIZE = CellSize(
    width=10,
    height=20,
)

CONSOLE_OPTIONS = ConsoleOptions(
    size=ConsoleDimensions(120, 58),
    legacy_windows=False,
    min_width=10,
    max_width=20,
    is_terminal=True,
    encoding="utf-8",
    max_height=20,
)