-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
36 lines (29 loc) · 924 Bytes
/
main.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
import click
import bmg
VERSION = "v1"
click.echo(f"yaBMGr {VERSION} by patataofcourse")
@click.group(help="converts BMG to RBMG and back",options_metavar='')
def cli():
pass
@cli.command( "unpack",
help="converts a BMG into the readable format RBMG",
no_args_is_help = True,
options_metavar='[-o/--output OUTPUT]'
)
@click.argument("input")
@click.option("-o", "--output", default=None)
def unpack(input, output):
bmg.unpack(input, output)
click.echo("Done!")
@cli.command( "pack",
help="converts a RBMG back into Nintendo's BMG",
no_args_is_help = True,
options_metavar='[-o/--output OUTPUT]'
)
@click.argument("input")
@click.option("-o", "--output", default=None)
def pack(input, output):
bmg.pack(input, output)
click.echo("Done!")
if __name__ == "__main__":
cli()