Add a base class for commands that provides wad and map arguments.
This commit is contained in:
parent
f8873e1947
commit
aff20e9557
6 changed files with 18 additions and 40 deletions
|
@ -1,14 +1,8 @@
|
|||
from cliff.command import Command
|
||||
import dcc.config
|
||||
import dcc.doom_base.WadMap
|
||||
import subprocess
|
||||
|
||||
class Record(Command):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
parser.add_argument('wad')
|
||||
parser.add_argument('map')
|
||||
return parser
|
||||
|
||||
class Record(dcc.doom_base.WadMap):
|
||||
def take_action(self, parsed_args):
|
||||
subprocess.run([dcc.config.DSDA] +
|
||||
dcc.config.DsdaPreamble(parsed_args.wad, parsed_args.map) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue