From 026128473cc6444a811500040f259603e141ec6d Mon Sep 17 00:00:00 2001 From: yrriban Date: Tue, 26 Aug 2025 01:49:52 -0400 Subject: [PATCH] Add a --stdin-only flag for text.py. Typically this is for when we have configured map names but are making a concatenated video and aren't using them. --- dcc/text.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dcc/text.py b/dcc/text.py index af06ebb..06b5a2e 100644 --- a/dcc/text.py +++ b/dcc/text.py @@ -29,13 +29,15 @@ class Text(dcc.doom_base.WadMap): parser = super().get_parser(prog_name) parser.add_argument("--nomap", action="store_true") parser.add_argument("--demotype", default="UV-Max Demo") + parser.add_argument("--stdin", "--stdin-only", action="store_true") return parser def take_action(self, parsed_args): text = None - map_names = self._config.get("map_names") - if map_names is not None: - text = map_names.get(f"map{parsed_args.map}") + if not parsed_args.stdin: + map_names = self._config.get("map_names") + if map_names is not None: + text = map_names.get(f"map{parsed_args.map}") if text is None: text = sys.stdin.read().rstrip() if not parsed_args.nomap: