feat: обозначил аргументы командной строки
This commit is contained in:
@ -1,5 +1,22 @@
|
|||||||
|
import rulesparser
|
||||||
|
import rulebook
|
||||||
|
import argparse
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
raise NotImplementedError("Sorry, this project is WIP and didn't implement user functionality yet")
|
parser = argparse.ArgumentParser(
|
||||||
|
prog = "Markov",
|
||||||
|
description = "Simple tool to apply Markov's normal algorithms"
|
||||||
|
)
|
||||||
|
parser.add_argument("rulebook", type=str, help="File with the rules for algorithm")
|
||||||
|
parser.add_argument("-c", "--command-line-input", type=str, nargs='?',
|
||||||
|
help="Takes input from user via command line "
|
||||||
|
"arguments. There should be only one string. "
|
||||||
|
"Please, use quotation marks")
|
||||||
|
parser.add_argument("-v", "--verbose", action="store_true",
|
||||||
|
help="If set, verbose output will be produced. "
|
||||||
|
"It'll contain all intermediate transformations, "
|
||||||
|
"reason of stop etc.")
|
||||||
|
parser.parse_args()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user