2023-12-03 13:53:52 +01:00
|
|
|
import click
|
2023-12-05 09:25:02 +01:00
|
|
|
|
2023-12-03 13:53:52 +01:00
|
|
|
from toot.cli.base import Context, cli, pass_context
|
|
|
|
from toot.tui.app import TUI, TuiOptions
|
|
|
|
|
2023-12-05 09:25:02 +01:00
|
|
|
|
2023-12-03 13:53:52 +01:00
|
|
|
@cli.command()
|
|
|
|
@click.option(
|
|
|
|
"--relative-datetimes",
|
|
|
|
is_flag=True,
|
|
|
|
help="Show relative datetimes in status list"
|
|
|
|
)
|
|
|
|
@pass_context
|
|
|
|
def tui(ctx: Context, relative_datetimes: bool):
|
|
|
|
"""Launches the toot terminal user interface"""
|
|
|
|
options = TuiOptions(relative_datetimes, ctx.color)
|
|
|
|
TUI.create(ctx.app, ctx.user, options).run()
|