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.
This commit is contained in:
yrriban 2025-08-26 01:49:52 -04:00
parent a3da884eee
commit 026128473c

View file

@ -29,10 +29,12 @@ class Text(dcc.doom_base.WadMap):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)
parser.add_argument("--nomap", action="store_true") parser.add_argument("--nomap", action="store_true")
parser.add_argument("--demotype", default="UV-Max Demo") parser.add_argument("--demotype", default="UV-Max Demo")
parser.add_argument("--stdin", "--stdin-only", action="store_true")
return parser return parser
def take_action(self, parsed_args): def take_action(self, parsed_args):
text = None text = None
if not parsed_args.stdin:
map_names = self._config.get("map_names") map_names = self._config.get("map_names")
if map_names is not None: if map_names is not None:
text = map_names.get(f"map{parsed_args.map}") text = map_names.get(f"map{parsed_args.map}")