From d75fa4934efde0eebb3f82ca56b7dd30c8160632 Mon Sep 17 00:00:00 2001 From: Ahmad Hmedan Date: Sun, 5 Apr 2026 09:42:08 +0100 Subject: [PATCH] feat: add cowsay CLI tool --- implement-cowsay/cow.py | 18 ++++++++++++++++++ implement-cowsay/requirements.txt | 1 + 2 files changed, 19 insertions(+) create mode 100644 implement-cowsay/cow.py create mode 100644 implement-cowsay/requirements.txt diff --git a/implement-cowsay/cow.py b/implement-cowsay/cow.py new file mode 100644 index 000000000..d20893ad2 --- /dev/null +++ b/implement-cowsay/cow.py @@ -0,0 +1,18 @@ +import cowsay +import argparse + +parser = argparse.ArgumentParser( + prog= "cowsay", + description= "Make animals say things", +) + +parser.add_argument("--animal",help= " The animal to be saying things.", default="cow",choices = cowsay.char_names) +parser.add_argument("message", nargs="+",help="The message to say") +args = parser.parse_args(); + +message = " ".join(args.message) + +animal = args.animal; + +output =cowsay.get_output_string(animal,message) +print(output) diff --git a/implement-cowsay/requirements.txt b/implement-cowsay/requirements.txt new file mode 100644 index 000000000..c6b9ffd0e --- /dev/null +++ b/implement-cowsay/requirements.txt @@ -0,0 +1 @@ +cowsay