Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Baboon Facts #326

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ You can see the bot in action at https://www.reddit.com/user/AnimalFactsBot/comm
* Armadillo
* Atlantic puffin
* Badger
* Baboon
* Bear
* Beaver
* Bison
Expand Down
19 changes: 19 additions & 0 deletions animalfacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def check_comment_for_animal(comment, reddit):
botengine('atlantic puffin', '\spuffins?\s', reddit, ATLANTIC_PUFFIN_FACTS, comment)
botengine('honeybadger', '\shoney badgers?\s', reddit, HONEYBADGER_FACTS, comment) # Needs to be here out of order so that it gets picked up before regular badger
botengine('badger', '\sbadgers?\s', reddit, BADGER_FACTS, comment)
botengine('baboon', '\sbaboon?\s', reddit, BABOON_FACTS, comment)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mind making this 4 spaces instead of a tab, please? Sorry!

botengine('bear', '\sbears?\s', reddit, BEAR_FACTS, comment)
botengine('beaver', '\sbeavers?\s', reddit, BEAVER_FACTS, comment)
botengine('buffalo', '\sbuffalos?\s', reddit, BUFFALO_FACTS, comment)
Expand Down Expand Up @@ -634,6 +635,17 @@ def animalfactsbot(reddit):
'Badgers were eaten in Britain during World War II and were once part of the Native American and settlers diets in the US. Russia still eats badger meat today.',
'Badgers have featured in lots of British literature over the years, such as Brian Jacques\' Redwall series, \'Tommy Brock\' in Beatrix Potter\'s The Tale of Mr. Tod, \'Bill Badger\' in Mary Tourtel\'s Rupert Bear, \'Mr. Badger\' in Kenneth Grahame\'s The Wind in the Willows, and \'Trufflehunter\' in C. S. Lewis\'s Chronicles of Narnia.',
)

BABOON_FACTS = (
'Male baboons are two times larger than females. Baboons can reach 14 to 30 inches in height at the shoulder and 50 to 100 pounds in weight.',
'Bodies of baboons are covered with fur that can be dark olive or yellow in color. Males and females look alike, except that females do not have long hair around their necks.',
'Baboons have long, dog-like muzzle and strong jaw equipped with sharp canines.',
'Baboons are mainly terrestrial animals (live on the ground). They travel large distances in the early morning and late afternoon in the search for food.',
'Baboons live in groups called troops. They consist of 7-8 males, twice as many females and their offspring. Dominance in the troop is established via fights.',
'Baboons use 30 different sounds for communication. They are able to grunt, scream and bark. Besides vocalization, baboons can yawn, smack their lips or shrug their shoulder to communicate.',
'Baboons can survive up to 30 years in the wild and up to 45 years in captivity.',
'Baboons reach sexual maturity between the age 5 and 8. Young males leave their native groups, while females stay.',
)

BEAR_FACTS = (
'There are eight different species of bear! The North American Black Bear, the Brown Bear, the Polar Bear, the Asiatic Black Bear, the Spectacled Bear, the Giant Panda, the Sloth Bear, and the Sun Bear!',
Expand Down Expand Up @@ -2290,6 +2302,9 @@ def animalfactsbot(reddit):
'Scientists believe that puffer fish developed their puffing tactic as a method of self defense because they are poor swimmers that cannot escape from danger quickly.',
'Sharks are the only species immune to the puffer fish\'s toxin. They can eat puffer fish without any negative consequences',
'Puffer fish do not have scales. Their skin is thick and rough. Some species have spines on their skin, which offer additional protection against predators.',
'Puffer fish can be discretely or brightly colored. There is often relationship between the body coloration and the amount of toxin produced by the fish (brighter colors are often associated with large quantity of toxin in the fish).',
'Puffer fish have four teeth that are fused in the beak-like structure. They use their teeth for opening of mussels, clams and shellfish. Puffer fish also eat algae and different types of worms and crustaceans.',
'One puffer fish contains enough toxin to kill 30 adult men.'
)

PORCUPINE_FACTS = (
Expand Down Expand Up @@ -2319,6 +2334,9 @@ def animalfactsbot(reddit):
'Quokkas do not fear humans and will approach people closely if you visit them on Rottnest Island. However, it is illegal for humans to handle or feed them.',
'Rottnest Island in Australia, where many quokkas live, was given its name when a Dutch explorer mistook the quokkas for rats. The name means "rat nest" in Dutch.',
'A baby quokka is called a joey. Females can give birth to joeys twice a year. The joey will live in the pouch of its mother for six months.',
'The average lifespan of a Quokka is 10 years.',
'Quokkas have sharp teeth and will shriek if cornered or attacked or if they feel threatened or provoked.',
'The quokkas lack of fear of humans and the small size of their natural habitat makes them vulnerable to becoming endangered as a species.',
)

RABBIT_FACTS = (
Expand Down Expand Up @@ -3018,6 +3036,7 @@ def animalfactsbot(reddit):
ARMADILLO_FACTS,
AXOLOTL_FACTS,
BADGER_FACTS,
BABOON_FACTS,
BEAR_FACTS,
BEAVER_FACTS,
BUFFALO_FACTS,
Expand Down