-
Notifications
You must be signed in to change notification settings - Fork 1
/
acecompressor.py
34 lines (27 loc) · 960 Bytes
/
acecompressor.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
import click
import pathlib
from acedecomp import Decrypter
from acecomp import Encrypter
@click.group()
def main():
pass
@main.command(help='Decompress ACE Studio project file')
@click.argument('input', metavar='INPUT')
@click.argument('output', metavar='OUTPUT')
def decomp(input: str, output: str):
input = pathlib.Path(input).resolve()
output = pathlib.Path(output).resolve()
assert input.exists(), 'The input file does not exist.'
decrypter = Decrypter()
decrypter.decomp_project(input, output)
@main.command(help='Compress ACE Studio project file')
@click.argument('input', metavar='INPUT')
@click.argument('output', metavar='OUTPUT')
def comp(input: str, output: str):
input = pathlib.Path(input).resolve()
output = pathlib.Path(output).resolve()
assert input.exists(), 'The input file does not exist.'
encrypter = Encrypter()
encrypter.comp_project(input, output)
if __name__ == '__main__':
main()