When generating dsda text file, automatically skip to the end of the file, and don't show the window if possible.

This commit is contained in:
yrriban 2025-04-30 18:52:55 -04:00
parent 9570d11cdc
commit 652fbf4b08

View file

@ -2,6 +2,7 @@ import dcc.config
import dcc.doom_base import dcc.doom_base
import os import os
import re import re
import shutil
import subprocess import subprocess
import zipfile import zipfile
@ -15,9 +16,13 @@ class DSDA(dcc.doom_base.WadMap):
dip = dcc.config.DemoInPath(parsed_args.wad, parsed_args.map) dip = dcc.config.DemoInPath(parsed_args.wad, parsed_args.map)
dtp = dcc.config.DsdaTextPath(parsed_args.wad, parsed_args.map) dtp = dcc.config.DsdaTextPath(parsed_args.wad, parsed_args.map)
if not dtp.exists(): if not dtp.exists():
subprocess.run([dcc.config.DSDA] + command = [dcc.config.DSDA]
if shutil.which("xvfb-run") is not None:
command = ["xvfb-run"] + command
# TODO: negative tics should seek from the end, but this doesn't seem to work.
subprocess.run(command +
dcc.config.DsdaPreamble(parsed_args.wad, parsed_args.map) + dcc.config.DsdaPreamble(parsed_args.wad, parsed_args.map) +
["-playdemo", dip, "-export_text_file"]) ["-fastdemo", dip, "-nosound", "-skiptic", "999999999", "-export_text_file"])
editor = "nano" editor = "nano"
if "EDITOR" in os.environ: if "EDITOR" in os.environ:
editor = os.environ["EDITOR"] editor = os.environ["EDITOR"]