Compare commits
2 commits
9bc41264e5
...
cbf2ec2ca6
| Author | SHA1 | Date | |
|---|---|---|---|
| cbf2ec2ca6 | |||
| a982c5b20c |
2 changed files with 13 additions and 2 deletions
|
|
@ -26,6 +26,8 @@ class RIB(doomcc.doom_base.WadMap):
|
|||
demodir = demodir / "failed_demos"
|
||||
|
||||
glob = f"*map{self.map}*"
|
||||
if parsed_args.name is not None:
|
||||
glob += f"{parsed_args.name}*"
|
||||
if parsed_args.attempt is not None:
|
||||
glob += f"{parsed_args.attempt}*"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import wand.image
|
|||
class Thumb(doomcc.doom_base.WadMap):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
parser.add_argument("--index", action="store_true")
|
||||
parser.add_argument("--index", nargs="?", const="none", default="")
|
||||
parser.add_argument("--noov", action="store_true")
|
||||
return parser
|
||||
|
||||
|
|
@ -28,11 +28,20 @@ class Thumb(doomcc.doom_base.WadMap):
|
|||
mdi.border(tc, 5, 5)
|
||||
bi.composite(mdi, gravity="north_west")
|
||||
|
||||
if parsed_args.index:
|
||||
if parsed_args.index != "":
|
||||
with wand.image.Image(
|
||||
filename=self.fabricate.joinpath("doomed_index.png")
|
||||
) as di:
|
||||
di.border(tc, 1, 1)
|
||||
bi.composite(di, gravity="north_east")
|
||||
|
||||
if parsed_args.index != "none":
|
||||
ird = self._config.get("index_rating", {})
|
||||
if parsed_args.index in ird:
|
||||
with wand.image.Image(
|
||||
filename=self.fabricate.joinpath(self.fabricate.joinpath(ird[parsed_args.index]))) as ri:
|
||||
ri.border(tc, 1, 1)
|
||||
bi.composite(ri, top=di.height+5, left=int(bi.width-ri.width-(di.width-ri.width)/2))
|
||||
|
||||
|
||||
bi.save(filename=self.thumb_path())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue