From 48c7f3ad2e16d7b1834e5d23729466463cf5e0ef Mon Sep 17 00:00:00 2001 From: Rany Date: Fri, 22 Nov 2024 18:37:44 +0200 Subject: [PATCH] Accept - as a valid input parameter (#319) We won't do the same for the output parameter as it is the default behavior when --write-media is not set. Closes: https://github.com/rany2/edge-tts/issues/216 Signed-off-by: rany --- src/edge_tts/util.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/edge_tts/util.py b/src/edge_tts/util.py index 1d8c6b0..2d42ebd 100644 --- a/src/edge_tts/util.py +++ b/src/edge_tts/util.py @@ -117,9 +117,7 @@ async def amain() -> None: sys.exit(0) if args.file is not None: - # we need to use sys.stdin.read() because some devices - # like Windows and Termux don't have a /dev/stdin. - if args.file == "/dev/stdin": + if args.file in ("-", "/dev/stdin"): args.text = sys.stdin.read() else: with open(args.file, "r", encoding="utf-8") as file: