forked from mashimycota/om2bms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
om2bms_osu.py
55 lines (42 loc) · 1.71 KB
/
om2bms_osu.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
import os
from argparse import ArgumentParser
import om2bms.om_to_bms
if __name__ == '__main__':
parser = ArgumentParser(description='Convert a .osu osu!mania file to a BMS file. '
'Outputs to directory of om2bms.py',
add_help=True,
allow_abbrev=True)
parser.add_argument('-i', '--in_file',
action='store',
help='Path to file to be converted.',
type=str)
parser.add_argument('-hs', '--hitsound',
action='store_false',
default=False,
help='Disables hitsounds.')
parser.add_argument('-b', '--bg',
action='store_false',
default=True,
help='Disables background conversion.')
parser.add_argument('-o', '--offset',
default=0,
type=int,
help="Adjusts music start time by [offset] ms.")
parser.add_argument('-j', '--judge',
default=2,
type=int,
help="Judge difficulty. Defaults to EASY. "
"(3: EASY), (2: NORMAL), (1: HARD), (0: VERY HARD)")
args = parser.parse_args()
cwd = os.getcwd()
om2bms.om_to_bms.OsuManiaToBMSParser._convertion_options = {
"HITSOUND": args.hitsound,
"VIDEO": False,
"BG": args.bg,
"OFFSET": args.offset,
"JUDGE": args.judge
}
convert = om2bms.om_to_bms.OsuManiaToBMSParser(
args.in_file, os.getcwd(), args.in_file)
print("Done")
exit(0)