-
Notifications
You must be signed in to change notification settings - Fork 0
/
arguments.py
31 lines (25 loc) · 1.09 KB
/
arguments.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
import argparse
parser = argparse.ArgumentParser(
description="Compiler for LazyCMD",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument("in",
type = argparse.FileType("r"),
help = "Input file, typically an .lazycmd file",
)
parser.add_argument("-c","--comments",
choices = ["none", "north", "east", "south", "west", "up", "down"],
help = "Include comments as signs",
default = "none"
)
parser.add_argument("facing",
choices = ["north", "east", "south", "west", "up", "down"],
default = "north",
metavar = "dir",
help = "Changes the direction that the command block towers face",
)
parser.add_argument("-o", "--out",
type = argparse.FileType("w"),
help = "Output file, prints commands to terminal if not specified",
)
args = parser.parse_args()