2023-11-26 18:00:57 +01:00
|
|
|
import sys
|
|
|
|
from toot.cli import cli
|
|
|
|
from toot.exceptions import ConsoleError
|
|
|
|
from toot.output import print_err
|
|
|
|
from toot.settings import load_settings
|
2023-06-30 11:02:13 +02:00
|
|
|
|
2023-11-26 18:00:57 +01:00
|
|
|
try:
|
|
|
|
defaults = load_settings().get("commands", {})
|
|
|
|
cli(default_map=defaults)
|
|
|
|
except ConsoleError as ex:
|
|
|
|
print_err(str(ex))
|
|
|
|
sys.exit(1)
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
print_err("Aborted")
|
|
|
|
sys.exit(1)
|