repype.textual.app

class repype.textual.app.Repype(path: PathLike | None = None, headless: bool = False, **kwargs)

Bases: App

The main application class. Can only be instantiated once per process.

Parameters:
  • path – The root directory for batch processing, where the tasks are loaded from. Passed through to repype.batch.Batch.load(). Parsed from the command-line, if None.

  • headless – Run in headless mode for debugging. If True, overwrites the headless argument passed to run(). Can also be overwritten by the command-line argument --headless.

  • **kwargs – Additional keyword arguments passed to repype.batch.Batch.

BINDINGS: ClassVar[list[BindingType]] = [Binding(key='q', action='exit', description='Exit', show=True, key_display=None, priority=False)]

The bindings of the application.

CSS_PATH: ClassVar[CSSPathType | None] = 'repype.tcss'

The path to the stylesheet file.

ENABLE_COMMAND_PALETTE: ClassVar[bool] = False

Disable the command palette.

SCREENS: ClassVar[dict[str, Screen[Any] | Callable[[], Screen[Any]]]] = {'batch': BatchScreen()}

Initially available screens.

action_exit() None

Exits the app.

batch: Batch

The batch object.

headless: bool

If True, overwrites the headless argument passed to run().

on_mount() None

Loads the BatchScreen as the initial screen of the app.

path: Path

The root directory for batch processing, where the tasks are loaded from.

run(*args, headless: bool = False, **kwargs) None

Run the app.

Parameters:
  • headless – Run in headless mode (no output).

  • inline – Run the app inline (under the prompt).

  • inline_no_clear – Don’t clear the app output when exiting an inline app.

  • mouse – Enable mouse support.

  • size – Force terminal size to (WIDTH, HEIGHT), or None to auto-detect.

  • auto_pilot – An auto pilot coroutine.

Returns:

App return value.