Immediately decide I don't like the previous commit and refactor it somewhat.
This commit is contained in:
parent
63bc1436fe
commit
d1ddad97ef
1 changed files with 8 additions and 8 deletions
|
@ -55,18 +55,18 @@ def DemoInPath(wad, mapstr):
|
|||
return sorted(filter(lambda s : re.search("-", str(s)), candidates))[-1]
|
||||
|
||||
def DemoOutPath(wad, mapstr):
|
||||
if not DEMOS.joinpath(wad).exists():
|
||||
os.mkdir(DEMOS.joinpath(wad))
|
||||
return DEMOS.joinpath(wad).joinpath(DemoName(wad, mapstr))
|
||||
return Ensure(DEMOS.joinpath(wad)).joinpath(DemoName(wad, mapstr))
|
||||
|
||||
def DemoName(wad, mapstr):
|
||||
return "{}_map{}.lmp".format(wad, mapstr)
|
||||
|
||||
def BaseThumbPath(wad, mapstr):
|
||||
if not OUTPUT.joinpath(wad).exists():
|
||||
os.makedirs(OUTPUT.joinpath(wad), exist_ok=True)
|
||||
return OUTPUT.joinpath(wad).joinpath("{}_map{}_base.png".format(wad, mapstr))
|
||||
return Ensure(OUTPUT.joinpath(wad)).joinpath("{}_map{}_base.png".format(wad, mapstr))
|
||||
|
||||
def VideoPath(wad, mapstr):
|
||||
os.makedirs(OUTPUT.joinpath(wad), exist_ok=True)
|
||||
return OUTPUT.joinpath(wad).joinpath("{}_map{}.mp4".format(wad, mapstr))
|
||||
return Ensure(OUTPUT.joinpath(wad)).joinpath("{}_map{}.mp4".format(wad, mapstr))
|
||||
|
||||
def Ensure(path):
|
||||
if not path.exists():
|
||||
ok.mkdir(path)
|
||||
return path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue