From 92e830b6642175b20aa1430d7c8fbfc6200ae665 Mon Sep 17 00:00:00 2001 From: yrriban Date: Sat, 9 Aug 2025 11:23:59 -0400 Subject: [PATCH 1/9] Add an demo attempt selector to run-it-back mode. Also fix a type conversion issue for when secs_before is set to a nondefault value. --- dcc/rib.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dcc/rib.py b/dcc/rib.py index aca28fd..2913368 100644 --- a/dcc/rib.py +++ b/dcc/rib.py @@ -9,6 +9,7 @@ class RIB(dcc.doom_base.WadMap): def get_parser(self, prog_name): parser = super().get_parser(prog_name) parser.add_argument("-s", "--secs_before", default=10) + parser.add_argument("-a", "--attempt") return parser # TODO: the root path should probably be configurable. @@ -25,7 +26,11 @@ class RIB(dcc.doom_base.WadMap): demodir = demodir.joinpath(w.stem.lower()) demodir = demodir / "failed_demos" - for f in demodir.glob(f"*map{self.map}*", case_sensitive=False): + glob = f"*map{self.map}*" + if parsed_args.attempt is not None: + glob += f"{parsed_args.attempt}*" + + for f in demodir.glob(glob, case_sensitive=False): st = os.stat(f) if st.st_mtime > dt: demo = f @@ -40,5 +45,5 @@ class RIB(dcc.doom_base.WadMap): subprocess.run( [self.dsda] + self.dsda_preamble(warp=False) + ["-playdemo", demo] - + ["-skiptic", str(-35 * parsed_args.secs_before)] + + ["-skiptic", str(-35 * int(parsed_args.secs_before))] ) From 738f6f7964f1e92d1ccd50ccb0ebdb15f4080921 Mon Sep 17 00:00:00 2001 From: yrriban Date: Sat, 9 Aug 2025 11:26:01 -0400 Subject: [PATCH 2/9] Set type=int on secs_before. This lets us skip a type conversion below. --- dcc/rib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dcc/rib.py b/dcc/rib.py index 2913368..7e00265 100644 --- a/dcc/rib.py +++ b/dcc/rib.py @@ -8,7 +8,7 @@ import time class RIB(dcc.doom_base.WadMap): def get_parser(self, prog_name): parser = super().get_parser(prog_name) - parser.add_argument("-s", "--secs_before", default=10) + parser.add_argument("-s", "--secs_before", type=int, default=10) parser.add_argument("-a", "--attempt") return parser @@ -45,5 +45,5 @@ class RIB(dcc.doom_base.WadMap): subprocess.run( [self.dsda] + self.dsda_preamble(warp=False) + ["-playdemo", demo] - + ["-skiptic", str(-35 * int(parsed_args.secs_before))] + + ["-skiptic", str(-35 * parsed_args.secs_before)] ) From bf37d48f124681740e0bf0e99b7ac7975a2f2196 Mon Sep 17 00:00:00 2001 From: yrriban Date: Tue, 12 Aug 2025 22:23:33 -0400 Subject: [PATCH 3/9] List version in __init__.py. --- dcc/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dcc/__init__.py b/dcc/__init__.py index e69de29..f102a9c 100644 --- a/dcc/__init__.py +++ b/dcc/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.1" From 09381b47565aa63494a70d21a60530e8ef449a21 Mon Sep 17 00:00:00 2001 From: yrriban Date: Wed, 20 Aug 2025 22:38:24 -0400 Subject: [PATCH 4/9] Update gitignore to handle poetry-produced files. --- .gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3cfdaab..4e300d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ +*.spec *.swo *.swp -build -venv __pycache__ +build dcc.egg-info dist +poetry.lock +venv From c0015583ffa42c62b71a9bf299facc7f6f606b68 Mon Sep 17 00:00:00 2001 From: yrriban Date: Wed, 20 Aug 2025 22:39:07 -0400 Subject: [PATCH 5/9] Add MIT license. --- LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f0e43ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2025 yrriban + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From cf6fb5cb996d63942cb5459bf697dc861d95ab93 Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 21 Aug 2025 01:17:26 -0400 Subject: [PATCH 6/9] Fix syntax for doomed index thumbnail generation. --- dcc/thumb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dcc/thumb.py b/dcc/thumb.py index a1afa95..9240756 100644 --- a/dcc/thumb.py +++ b/dcc/thumb.py @@ -28,7 +28,7 @@ class Thumb(dcc.doom_base.WadMap): if parsed_args.index: with wand.image.Image( - filename=self.output.joinpath("doomed_index.png") + filename=self.fabricate.joinpath("doomed_index.png") ) as di: di.border(tc, 1, 1) bi.composite(di, gravity="north_east") From e247c954e17dc49e88d1124c1804c91eb720622c Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 21 Aug 2025 01:27:22 -0400 Subject: [PATCH 7/9] Add a rudimentary README. --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..707c232 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Doom Command Center + +Doom Command Center is an all-in-one tool for automating the process of obtaining Doom WADs, recording demos, producing videos, and anything else Doom-related you may want to do. From 5938c2e3063b9d778d9ebc66ab652664d8cdaf9c Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 21 Aug 2025 01:29:31 -0400 Subject: [PATCH 8/9] Add a pyproject.toml with poetry and pyinstaller support. --- pyproject.toml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..428c907 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[project] +name = "dcc" +version = "0.1.0" +description = "Doom Command Center" +authors = [ + {name = "yrriban",email = "yrriban@gmail.com"} +] +license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "av (>=15.0.0,<16.0.0)", + "boto3 (>=1.40.9,<2.0.0)", + "cliff (>=4.10.0,<5.0.0)", + "numpy (>=2.3.2,<3.0.0)", + "omgifol (>=0.5.1,<0.6.0)", + "tomlkit (>=0.13.3,<0.14.0)", + "wand (>=0.6.13,<0.7.0)", +] + + +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" + +[project.scripts] +dcc = "dcc.main:main" + +[tool.poetry-pyinstaller-plugin.scripts] +dcc = { source = "dcc/main.py", type = "onefile" } + +[tool.poetry-pyinstaller-plugin.collect] +all = ["dcc"] From 545030c0a7ef38d9c82894638dc34b99153d939d Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 21 Aug 2025 01:34:49 -0400 Subject: [PATCH 9/9] Delete setup.py; pyproject.toml has replaced it. --- setup.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 9222cf5..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -from setuptools import find_packages -from setuptools import setup - -PROJECT = "dcc" - -VERSION = "0.0.1" - -long_description = "" - -setup( - name=PROJECT, - version=VERSION, - description="Doom Command Center", - long_description=long_description, - author="yrriban", - author_email="yrriban@gmail.com", - platforms=["Any"], - install_requires=["cliff"], - packages=find_packages(), - include_package_data=True, - entry_points={ - "console_scripts": ["dcc=dcc.main:main"], - "dcc": [ - "play = dcc.play:Play", - "record = dcc.record:Record", - "rib = dcc.rib:RIB", - "fabricate = dcc.fabricate:Fabricate", - "put = dcc.put:Put", - "pb = dcc.pb:PB", - "ss = dcc.ss:SS", - "extract = dcc.extract:Extract", - "fetch = dcc.fetch:Fetch", - "text = dcc.text:Text", - "thumb = dcc.thumb:Thumb", - "dsda = dcc.dsda:DSDA", - "eureka = dcc.eureka:Eureka", - "ls = dcc.ls:List", - "configure = dcc.configure:Configure", - "concat = dcc.concat:Concat", - ], - }, - zip_safe=False, -)