diff --git a/.gitignore b/.gitignore index c4234ab74..7da58019c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules testoutput.txt +.venv/ +__pycache__/ diff --git a/implement-cowsay/cow.py b/implement-cowsay/cow.py new file mode 100644 index 000000000..7e59d684d --- /dev/null +++ b/implement-cowsay/cow.py @@ -0,0 +1,20 @@ +import argparse +import cowsay +parser = argparse.ArgumentParser( + prog="cowsay", + description="Make animals say things", +) +parser.add_argument( + "--animal", + choices=cowsay.char_names, + default="cow", + help="The animal to be saying things.", +) +parser.add_argument( + "message", + nargs='+', + help="The message to say.", +) +args = parser.parse_args() +message = " ".join(args.message) +print(cowsay.get_output_string(args.animal, message)) \ No newline at end of file diff --git a/implement-cowsay/requirements.txt b/implement-cowsay/requirements.txt new file mode 100644 index 000000000..9e0634373 --- /dev/null +++ b/implement-cowsay/requirements.txt @@ -0,0 +1 @@ +cowsay==6.1