-
Notifications
You must be signed in to change notification settings - Fork 0
/
rom_manager.py
executable file
·55 lines (51 loc) · 1.47 KB
/
rom_manager.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python3
"""
manage roms on specific devices
"""
import settings
import cli_args
import msg
import arcade
import console
### main loop ###
def main(args,conf):
"""main function"""
debug = args.verbose
noop = args.noop
# read the other arguments
if args.listhw:
msg.hw(conf)
else:
try:
remote_hw = conf['remote_hw'][args.remote]
if args.console:
for local_folder in args.console[0]:
console.sync(
local_folder,
remote_hw,
conf['banned_words'],
conf['country_list'],
conf['allow_translations'],
debug,
noop
)
elif args.arcade:
arcade.curate(
args.arcade[0],
remote_hw,
conf['banned_arcade_games'],
conf['mame_rom_path'],
conf['mame_data_file'],
conf['mame_merged_roms'],
conf['replace_roms'],
debug,
noop
)
else:
msg.die("argument error")
except KeyError:
msg.die(f"{args.remote} is not a valid remote identifier")
if __name__ == "__main__":
ARGS = cli_args.parse()
CONF = settings.load(ARGS.verbose)
main(ARGS,CONF)