diff --git a/implement-cowsay/animalsay.py b/implement-cowsay/animalsay.py new file mode 100644 index 00000000..09087a26 --- /dev/null +++ b/implement-cowsay/animalsay.py @@ -0,0 +1,17 @@ +import cowsay +import argparse + +parser = argparse.ArgumentParser( + prog = "cowsay shell command", + description = "cowsay shell command on python Make animals say things" +) +# animals = ["beavis","cheese","cow","daemon","dragon","fox","ghostbusters","kitty","meow","miki","milk","octopus","pig","stegosaurus","stimpy","trex","turkey","turtle","tux"] +animals = cowsay.char_names +parser.add_argument("--animal", choices=animals, default = "cow", help="The animal to be saying things.") +parser.add_argument("message", nargs="+", help="The message to say.") + +args = parser.parse_args() + +cowsay_function = cowsay.char_funcs[args.animal] +cowsay_function(" ".join(args.message)) + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..c6b9ffd0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +cowsay