TerminalConfig
Module: terminaltexteffects.engine.terminal
Bases: ArgsDataClass
Configuration for the terminal.
Attributes:
Name | Type | Description |
---|---|---|
tab_width |
int
|
Number of spaces to use for a tab character. |
xterm_colors |
bool
|
Convert any colors specified in RBG hex to the closest XTerm-256 color. |
no_color |
bool
|
Disable all colors in the effect. |
wrap_text |
bool
|
Wrap text wider than the canvas width. |
frame_rate |
float
|
Target frame rate for the animation. |
canvas_width |
int
|
Cavas width, if set to 0 the canvas width is detected automatically based on the terminal device. |
canvas_height |
int
|
Canvas height, if set to 0 the canvas height is detected automatically based on the terminal device. |
anchor_canvas |
Literal['sw', 's', 'se', 'e', 'ne', 'n', 'nw', 'w', 'c']
|
Anchor point for the Canvas. The Canvas will be anchored in the terminal to the location corresponding to the cardinal/diagonal direction. Defaults to 'sw'. |
anchor_effect |
Literal['sw', 's', 'se', 'e', 'ne', 'n', 'nw', 'w', 'c']
|
Anchor point for the effect within the Canvas. Effect text will anchored in the Canvas to the location corresponding to the cardinal/diagonal direction. Defaults to 'sw'. |
ignore_terminal_dimensions |
bool
|
Ignore the terminal dimensions and utilize the full Canvas beyond the extents of the terminal. Useful for sending frames to another output handler. |
Source code in terminaltexteffects/engine/terminal.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
anchor_canvas: Literal['sw', 's', 'se', 'e', 'ne', 'n', 'nw', 'w', 'c'] = ArgField(cmd_name=['--anchor-canvas'], choices=['sw', 's', 'se', 'e', 'ne', 'n', 'nw', 'w', 'c'], default='sw', help='Anchor point for the canvas. The canvas will be anchored in the terminal to the location corresponding to the cardinal/diagonal direction.')
class-attribute
instance-attribute
Literal['sw','s','se','e','ne','n','nw','w','c'] : Anchor point for the canvas. The canvas will be anchored in the terminal to the location corresponding to the cardinal/diagonal direction.
anchor_text: Literal['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'c'] = ArgField(cmd_name=['--anchor-text'], choices=['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'c'], default='sw', help='Anchor point for the text within the Canvas. Input text will anchored in the Canvas to the location corresponding to the cardinal/diagonal direction.')
class-attribute
instance-attribute
Literal['n','ne','e','se','s','sw','w','nw','c'] : Anchor point for the text within the Canvas. Input text will anchored in the Canvas to the location corresponding to the cardinal/diagonal direction.
canvas_height: int = ArgField(cmd_name=['--canvas-height'], metavar=argvalidators.CanvasDimension.METAVAR, type_parser=argvalidators.CanvasDimension.type_parser, default=-1, help='Canvas height, set to an integer > 0 to use a specific dimension, or use 0, or -1 to set the dimension based off the input data or the terminal device, respectively.')
class-attribute
instance-attribute
int : Canvas height, if set to 0 the canvas height is is detected automatically based on the terminal device, if set to -1 the canvas width is based on the input data height.
canvas_width: int = ArgField(cmd_name=['--canvas-width'], metavar=argvalidators.CanvasDimension.METAVAR, type_parser=argvalidators.CanvasDimension.type_parser, default=-1, help='Canvas width, set to an integer > 0 to use a specific dimension, or use 0, or -1 to set the dimension based off the input data or the terminal device, respectively.')
class-attribute
instance-attribute
int : Canvas width, if set to 0 the canvas width is detected automatically based on the terminal device, if set to -1 the canvas width is based on the input data width.
frame_rate: float = ArgField(cmd_name='--frame-rate', type_parser=argvalidators.PositiveInt.type_parser, default=100, help='Target frame rate for the animation.')
class-attribute
instance-attribute
float : Minimum time, in seconds, between frames.
ignore_terminal_dimensions: bool = ArgField(cmd_name=['--ignore-terminal-dimensions'], default=False, action='store_true', help='Ignore the terminal dimensions and utilize the full Canvas beyond the extents of the terminal. Useful for sending frames to another output handler.')
class-attribute
instance-attribute
bool : Ignore the terminal dimensions and utilize the full Canvas beyond the extents of the terminal. Useful for sending frames to another output handler.
no_color: bool = ArgField(cmd_name=['--no-color'], default=False, action='store_true', help='Disable all colors in the effect.')
class-attribute
instance-attribute
bool : Disable all colors in the effect.
tab_width: int = ArgField(cmd_name=['--tab-width'], type_parser=argvalidators.PositiveInt.type_parser, metavar=argvalidators.PositiveInt.METAVAR, default=4, help='Number of spaces to use for a tab character.')
class-attribute
instance-attribute
int : Number of spaces to use for a tab character.
wrap_text: int = ArgField(cmd_name='--wrap-text', default=False, action='store_true', help='Wrap text wider than the canvas width.')
class-attribute
instance-attribute
bool : Wrap text wider than the canvas width.
xterm_colors: bool = ArgField(cmd_name=['--xterm-colors'], default=False, action='store_true', help='Convert any colors specified in RBG hex to the closest XTerm-256 color.')
class-attribute
instance-attribute
bool : Convert any colors specified in RBG hex to the closest XTerm-256 color.