abacura package¶
Subpackages¶
- abacura.mud package
- abacura.plugins package
- abacura.widgets package
Submodules¶
abacura.abacura module¶
Main Textual App and Entrypoint
- class abacura.abacura.Abacura[source]¶
Bases:
App
A Textual mudclient
- AUTO_FOCUS: ClassVar[str | None] = 'InputBar'¶
A selector to determine what to focus automatically when a screen is activated.
The widget focused is the first that matches the given [CSS selector](/guide/queries/#query-selectors). Setting to None or “” disables auto focus.
- BINDINGS: ClassVar[list[BindingType]] = [('ctrl+d', 'toggle_dark', 'Toggle dark mode'), ('ctrl+q', 'quit', 'Quit'), ('f3', 'reload_config', 'f3'), Binding(key='f12', action='toggle_inspector', description='Toggle Inspector', show=True, key_display=None, priority=False)]¶
- CSS_PATH: ClassVar[CSSPathType | None] = ['./css/abacura.css']¶
File paths to load CSS from.
- SCREENS: ClassVar[dict[str, Screen | Callable[[], Screen]]] = {}¶
Screens associated with the app for the lifetime of the app.
- START_SESSION: str | None¶
Dependency descriptor for dependencies specified as class level annotations
- inspector: bool¶
Dependency descriptor for dependencies specified as class level annotations
abacura.config module¶
Abacura configuration module
Module contents¶
Main screen and widgets for abacura
- class abacura.AbacuraSuggester(session)[source]¶
Bases:
Suggester
- async get_suggestion(value: str) Coroutine[Any, Any, str | None] [source]¶
Try to get a completion suggestion for the given input value.
Custom suggesters should implement this method.
- Note:
The value argument will be casefolded if self.case_sensitive is False.
- Note:
If your implementation is not deterministic, you may need to disable caching.
- Args:
value: The current value of the requester widget.
- Returns:
A valid suggestion or None.
- class abacura.InputBar(id: str = '')[source]¶
Bases:
Input
- BINDINGS: ClassVar[list[BindingType]] = [('up', 'history_scrollback', None), ('down', 'history_scrollforward', None), ('tab', 'cursor_right', None)]¶
player input line
- class UserCommand(command: str)[source]¶
Bases:
Message
Message object to bubble up inputs with
- bubble: ClassVar[bool] = True¶
- handler_name: ClassVar[str] = 'on_input_bar_user_command'¶
Name of the default message handler.
- no_dispatch: ClassVar[bool] = False¶
- time¶
- verbose: ClassVar[bool] = False¶
- can_focus: bool = True¶
Widget may receive focus.
- can_focus_children: bool = True¶
Widget’s children may receive focus.
- class abacura.SessionScreen(name: str)[source]¶
Bases:
Screen
Default Screen for sessions
- AUTO_FOCUS: ClassVar[str | None] = 'InputBar'¶
A selector to determine what to focus automatically when the screen is activated.
The widget focused is the first that matches the given [CSS selector](/guide/queries/#query-selectors). Set to None to inherit the value from the screen’s app. Set to “” to disable auto focus.
- BINDINGS: ClassVar[list[BindingType]] = [('pageup', 'pageup', 'PageUp'), ('pagedown', 'pagedown', 'PageDown'), ('f2', 'toggle_sidebar', 'F2'), ('f3', 'toggle_commslog', 'F3')]¶
- can_focus: bool = False¶
Widget may receive focus.
- can_focus_children: bool = True¶
Widget’s children may receive focus.
- async on_input_bar_user_command(command: UserCommand) None [source]¶
Handle user input from InputBar