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 <rany2@riseup.net>
This commit is contained in:
Rany
2024-11-22 18:37:44 +02:00
committed by GitHub
parent 6bc3a9e20f
commit 48c7f3ad2e

View File

@@ -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: