diff --git a/implement-cowsay/cow.py b/implement-cowsay/cow.py new file mode 100644 index 00000000..ff05fd97 --- /dev/null +++ b/implement-cowsay/cow.py @@ -0,0 +1,23 @@ +import cowsay +import argparse + +list_of_choices = cowsay.char_names + + +parser = argparse.ArgumentParser( + prog="cowsay", + description="Make animals say things", +) + +parser.add_argument( + "--animal", + nargs="?", + default="cow", + help="The animal to be saying things.", + choices=list_of_choices, +) +parser.add_argument("message", nargs="*", default="", help="message to say") + +args = parser.parse_args() + +print(cowsay.get_output_string(str(args.animal), " ".join(args.message))) diff --git a/implement-cowsay/requirements.txt b/implement-cowsay/requirements.txt new file mode 100644 index 00000000..cc557103 --- /dev/null +++ b/implement-cowsay/requirements.txt @@ -0,0 +1 @@ +cowsay \ No newline at end of file