diff --git a/.gitignore b/.gitignore index 3c3629e64..ec685bab8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ node_modules +implement-cowsay/.venv +**/package.json +**/package-lock.json +implement-cowsay/requirements.txt \ No newline at end of file diff --git a/implement-cowsay/cow-laughing.py b/implement-cowsay/cow-laughing.py new file mode 100644 index 000000000..182535907 --- /dev/null +++ b/implement-cowsay/cow-laughing.py @@ -0,0 +1,33 @@ +import argparse +import cowsay + + +def main(): + animals = cowsay.char_names + + parser = argparse.ArgumentParser( + description="Make animals saying things." + ) + + parser.add_argument( + "message", + nargs="+", + help="The message to say.", + ) + + parser.add_argument( + "--animal", + choices=animals, + help="The animal to be saying things.", + default="cow", + ) + + args = parser.parse_args() + msg = " ".join(args.message) + + output = cowsay.get_output_string(args.animal, msg) + print(output) + + +if __name__ == "__main__": + main() \ No newline at end of file