From 606f27185c5b2b872cee0d20a36bf3e630356f14 Mon Sep 17 00:00:00 2001 From: yrriban Date: Tue, 13 May 2025 10:04:43 -0400 Subject: [PATCH] Fix various errors in the previous commit. --- dcc/doom_base.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dcc/doom_base.py b/dcc/doom_base.py index 668bdc7..a1ed843 100644 --- a/dcc/doom_base.py +++ b/dcc/doom_base.py @@ -3,7 +3,7 @@ from cliff.command import Command import dcc.config import io -class WadMap(Command): +class WadMap(dcc.config.Base): def get_parser(self, prog_name): parser = super().get_parser(prog_name) parser.add_argument('wad') @@ -65,33 +65,33 @@ class WadMap(Command): return sorted(filter(lambda s : re.search("-", str(s)), candidates))[-1] def dsda_text_path(self): - return _ensure(dcc.config.DEMOS.joinpath(self.wad)).joinpath(self._file_base(".txt")) + return self._ensure(dcc.config.DEMOS.joinpath(self.wad)).joinpath(self._file_base(".txt")) def video_path(self): - return _ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(self._file_base(".mp4")) + return self._ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(self._file_base(".mp4")) def demo_out_path(self): - return _ensure(dcc.config.DEMOS.joinpath(self.wad)).joinpath(self._file_base(".lmp")) + return self._ensure(dcc.config.DEMOS.joinpath(self.wad)).joinpath(self._file_base(".lmp")) def target_bucket(self): return "doom/" + self._file_base(".lmp") def base_thumb_path(self): - return _ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_base.png")) + return self._ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_base.png")) def m_doom_path(self): - return _ensure(OUTPUT.joinpath(self.wad)).joinpath("M_DOOM_scaled.png") + return self._ensure(OUTPUT.joinpath(self.wad)).joinpath("M_DOOM_scaled.png") def text_thumb_path(self): - return _ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_text.png")) + return self._ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_text.png")) def thumb_path(self): - return _ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_thumb.png")) + return self._ensure(dcc.config.OUTPUT.joinpath(self.wad)).joinpath(_file_base("_thumb.png")) def _file_base(self, ext): return "{}_map{}{}{}".format(self.wad, self.map, self.name_string, ext) - def _ensure(path): + def _ensure(self, path): if not path.exists(): os.mkdir(path) return path