Compare commits

...

9 commits

Author SHA1 Message Date
545030c0a7 Delete setup.py; pyproject.toml has replaced it. 2025-08-21 01:34:49 -04:00
5938c2e306 Add a pyproject.toml with poetry and pyinstaller support. 2025-08-21 01:29:31 -04:00
e247c954e1 Add a rudimentary README. 2025-08-21 01:27:22 -04:00
cf6fb5cb99 Fix syntax for doomed index thumbnail generation. 2025-08-21 01:17:26 -04:00
c0015583ff Add MIT license. 2025-08-20 22:39:07 -04:00
09381b4756 Update gitignore to handle poetry-produced files. 2025-08-20 22:38:24 -04:00
bf37d48f12 List version in __init__.py. 2025-08-12 22:23:33 -04:00
738f6f7964 Set type=int on secs_before.
This lets us skip a type conversion below.
2025-08-09 11:26:01 -04:00
92e830b664 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.
2025-08-09 11:23:59 -04:00
8 changed files with 56 additions and 48 deletions

6
.gitignore vendored
View file

@ -1,7 +1,9 @@
*.spec
*.swo *.swo
*.swp *.swp
build
venv
__pycache__ __pycache__
build
dcc.egg-info dcc.egg-info
dist dist
poetry.lock
venv

7
LICENSE Normal file
View file

@ -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.

3
README.md Normal file
View file

@ -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.

View file

@ -0,0 +1 @@
__version__ = "0.0.1"

View file

@ -8,7 +8,8 @@ import time
class RIB(dcc.doom_base.WadMap): class RIB(dcc.doom_base.WadMap):
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(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 return parser
# TODO: the root path should probably be configurable. # 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.joinpath(w.stem.lower())
demodir = demodir / "failed_demos" 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) st = os.stat(f)
if st.st_mtime > dt: if st.st_mtime > dt:
demo = f demo = f

View file

@ -28,7 +28,7 @@ class Thumb(dcc.doom_base.WadMap):
if parsed_args.index: if parsed_args.index:
with wand.image.Image( with wand.image.Image(
filename=self.output.joinpath("doomed_index.png") filename=self.fabricate.joinpath("doomed_index.png")
) as di: ) as di:
di.border(tc, 1, 1) di.border(tc, 1, 1)
bi.composite(di, gravity="north_east") bi.composite(di, gravity="north_east")

33
pyproject.toml Normal file
View file

@ -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"]

View file

@ -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,
)