Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.venv

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, you want to exclude the .venv directory. But what about the things you are installing into the .venv. Is there enough comitted here for me to be able to re-create your venv on my machine? which file is missing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you .I created the requirements.txt

38 changes: 38 additions & 0 deletions implement-cowsay/cowsay_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import argparse
import cowsay
import sys

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(
"--list-animals",
action="store_true",
help="List available animals and exit."
)

parser.add_argument(
"message",
nargs="*",
help="The message for the animal to say."
)

args = parser.parse_args()

if args.list_animals:
print("\n".join(cowsay.char_names))
sys.exit(0)

if not args.message:
parser.error("the following arguments are required: message")

getattr(cowsay, args.animal)(" ".join(args.message))
1 change: 1 addition & 0 deletions implement-cowsay/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cowsay