mirror of
https://github.com/daylinmorgan/yartsu.git
synced 2024-11-10 00:23:15 -06:00
fix: demo's uses it's own console
This commit is contained in:
parent
8cc214c2d4
commit
f201c41b6b
1 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import io
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
from argparse import SUPPRESS, FileType
|
from argparse import SUPPRESS, FileType
|
||||||
|
@ -67,9 +68,7 @@ def get_parser() -> ArgumentParser:
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
parser = get_parser()
|
parser = get_parser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
console = Console(
|
console = Console(record=True, force_terminal=True)
|
||||||
record=True, force_terminal=args.demo, force_interactive=args.demo
|
|
||||||
)
|
|
||||||
|
|
||||||
if args.list_themes:
|
if args.list_themes:
|
||||||
themes.list()
|
themes.list()
|
||||||
|
@ -111,6 +110,7 @@ def main() -> None:
|
||||||
parsed_input = Text.from_ansi(args.input.read())
|
parsed_input = Text.from_ansi(args.input.read())
|
||||||
|
|
||||||
elif args.demo:
|
elif args.demo:
|
||||||
|
console = Console(file=io.StringIO(), record=True, force_terminal=True)
|
||||||
parsed_input = make_test_card() # type: ignore
|
parsed_input = make_test_card() # type: ignore
|
||||||
|
|
||||||
title = args.title or cmd or "yartsu"
|
title = args.title or cmd or "yartsu"
|
||||||
|
|
Loading…
Reference in a new issue