Compare commits
4 commits
3fc029bf95
...
469d8eb13a
Author | SHA1 | Date | |
---|---|---|---|
469d8eb13a | |||
366ddf6132 | |||
114fec8f7e | |||
30baa49588 |
4 changed files with 11 additions and 9 deletions
|
@ -92,7 +92,7 @@ class Concat(dcc.doom_base.Wad):
|
|||
)
|
||||
img.trim(reset_coords=True)
|
||||
img.border("graya(25%, 25%)", 10, 10)
|
||||
img.border(dcc.config.TEXT_STROKE_COLOR, 16, 16)
|
||||
img.border(self.thumbnail_text_stroke, 16, 16)
|
||||
# for this to work... the image needs to have a width that's a
|
||||
# multiple of 8. dude whyyyyyyy
|
||||
padfactor = 8
|
||||
|
|
|
@ -20,6 +20,7 @@ class Base(Command):
|
|||
self._config_name = parsed_args.config_name
|
||||
self._config = tomlkit.toml_file.TOMLFile(
|
||||
self.doom.joinpath(self.config_name)).read()
|
||||
|
||||
self._dsda = self._config.get("dsda")
|
||||
if self.dsda is None:
|
||||
raise Exception(
|
||||
|
@ -28,6 +29,7 @@ class Base(Command):
|
|||
for d in ("iwads", "pwads", "demos", "fabricate"):
|
||||
self._init_attr([d], d, fn=self.doom.joinpath)
|
||||
|
||||
def finalize(self):
|
||||
self._init_attr(["thumbnail", "height"], 720)
|
||||
self._init_attr(["thumbnail", "width"], 1280)
|
||||
self._init_attr(["thumbnail", "font"], None)
|
||||
|
|
|
@ -21,12 +21,13 @@ class Wad(dcc.config.Base):
|
|||
self._wad_config = tomlkit.toml_file.TOMLFile(wcp).read()
|
||||
for k, v in self._wad_config.items():
|
||||
if isinstance(v, dict):
|
||||
if not k in self._config:
|
||||
if k not in self._config:
|
||||
self._config[k] = {}
|
||||
for sk in v:
|
||||
self._config[k][sk] = v[sk]
|
||||
else:
|
||||
self._config[k] = v
|
||||
self.finalize()
|
||||
|
||||
def run(self, parsed_args):
|
||||
self.wad_init(parsed_args)
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import dcc.config
|
||||
import dcc.doom_base
|
||||
import omg
|
||||
import numpy as np
|
||||
import wand.color
|
||||
import wand.image
|
||||
|
||||
|
||||
class Extract(dcc.config.base):
|
||||
class Extract(dcc.doom_base.Wad):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
parser.add_argument('wad')
|
||||
parser.add_argument('lump')
|
||||
return parser
|
||||
|
||||
|
@ -30,7 +29,7 @@ class Extract(dcc.config.base):
|
|||
) as img:
|
||||
img.transparent_color(wand.color.Color("#ff00ff"), 0.0)
|
||||
img.save(
|
||||
filename=self.output.joinpath(parsed_args.wad)
|
||||
filename=self.fabricate.joinpath(parsed_args.wad)
|
||||
.joinpath(parsed_args.lump + ".png")
|
||||
)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue