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 Crow Facts for #298 #316

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ You can see the bot in action at https://www.reddit.com/user/AnimalFactsBot/comm
* Crane
* Crayfish
* Crocodile
* Crow
* Cuttlefish
* Deer
* Degu
Expand Down
31 changes: 24 additions & 7 deletions animalfacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def check_comment_for_animal(comment, reddit):
botengine('crane', '\scranes?\s', reddit, CRANE_FACTS, comment)
botengine('crayfish', '\scrayfish(es)?\s', reddit, CRAYFISH_FACTS, comment)
botengine('crocodile', '\scrocodiles?\s', reddit, CROCODILE_FACTS, comment)
botengine('crow', '\scrows?\s', reddit, CROW_FACTS, comment)
botengine('deer', '\sdeer?\s', reddit, DEER_FACTS, comment)
botengine('cuttlefish', '\scuttle ?fish(es)?\s', reddit, CUTTLEFISH_FACTS, comment)
botengine('deer', '\sdeer?\s', reddit, DEER_FACTS, comment)
botengine('degu', '\sdegus?\s', reddit, DEGU_FACTS, comment)
Expand Down Expand Up @@ -652,7 +654,7 @@ def animalfactsbot(reddit):
'Sixty percent of the world’s puffins breed in Iceland.',
'Puffins are one of the few birds that have the ability to hold several small fish in their bills at a time. Their raspy tongues and spiny palates allow them to firmly grasp 10 to 12 fish during one foraging trip. They thus can bring more food back to their young compared with other seabirds that tend to swallow and regurgitate meals for their chicks.',
)

AVOCET_FACTS = (
'There are four different species of avocet which are the Pied avocet, the American avocet, the Red-necked avocet and the Andean avocet.',
'The avocet is a type of wading bird.',
Expand Down Expand Up @@ -697,7 +699,7 @@ 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.',
)

BARNACLE_FACTS = (
'Although the barnacle is frequently confused for a mollusc because of its hard outer shell, it is actually a crustacean.',
'In their juvenile form barnacles are free-floating, but eventually they attach themselves to any nearby rock, shell, or other object and stay there for the rest of their lives.',
Expand Down Expand Up @@ -783,7 +785,7 @@ def animalfactsbot(reddit):
'The popular impression of the blobfish as bulbous & gelatinous is partially due to decompression damage done to it when brought to the surface from the depths which it lives; they look more like a normal bony fish when they are kept in their natural depths.',
'The blobfish is listed as an endangered species.',
)

BOBCAT_FACTS = (
'An adult bobcat\'s tail averages just 6 to 7 inches in length.',
'The word bobcat a reference to their tail. In barbershop lingo, hair that’s been cut short is sometimes called “bobbed.”',
Expand Down Expand Up @@ -999,7 +1001,7 @@ def animalfactsbot(reddit):
'Coyotes are members of the Canidae family and share a lot of the same traits of their relatives: wolves, dogs, foxes and jackals.',
'Coyotes have narrow, elongated snouts, lean bodies, yellow eyes, bushy tails and thick fur.',
'Coyotes hunt at night and howl to communicate their location. They are also known for being "wily", in fact, they are very smart creatures and have a heightened sense of hearing, smell and sight.',
'Coyotes fur may be gray, white, tan or brown, depending on where they live.',
'Coyotes fur may be gray, white, tan or brown, depending on where they live.',
'Coyotes that live in the mountains have darker coats and ones that live in the desert have lighter coats.',
'Coyotes live in North America and roam the plains, forests, mountains and deserts of Canada, the United States, Mexico and Central America. Some even live in tropical climates.',
'Coyotes are solitary creatures and mark their territory with urine. When hunting deer, however, they use teamwork and form packs. They take turns pursuing the deer until it tires',
Expand Down Expand Up @@ -1066,6 +1068,20 @@ def animalfactsbot(reddit):
'Crocodiles lay 10 to 60 eggs at a time. The hatchlings stay in their eggs for 55 to 110 days. They are 7 to 10 inches (17.8 to 25.4 centimeters) long when they are born and don\'t mature until they are 4 to 15 years.',
)

CROW_FACTS = (
'Crows have their scientific name as Corvus brachyrhynchos. They belong to the family Covidae and to the genus Corvus.',
'Crows are pretty old. They first appeared during Miocene Period some 17 million years ago in Oceana and Australia.',
'Crows are omnivores. They eat just about anything that they think is edible (very much like the Chinese).',
'Crows can be found in every continent of this planet barring Antarctica. No matter where you go, you will find this bird.',
'Crows have the largest brain-to-body ratio of all bird species that fly in our skies and live on this planet.',
'Crows forebrain is very developed. This means that they are intelligent.',
'Crows maintain only one mate for their entire life. They don’t reach sexual maturity until they reach the age of 2 but some often wait longer to get their soulmate.',
'Crows display what is known as cooperative breeding. What’s that? When a female crow is incubating, other crows (whether soulmate or not) will watch out and protect the incubating female.',
'Crows take care of their babies and help them with feeding. That may not be weird but this is weird – some of the offspring will actually stay back to look after the next batch of babies.',
'Crows are amazingly social and smart. There can be several Murders. How will a crow know which Murder it belongs to? That’s possible with the help of specialized dialect every Murder develops.',
'Crows are very much capable of remembering faces.',
)

CUTTLEFISH_FACTS = (
'Cuttlefish are cephalopods, not fish. Cephalopods include octopus, squid, and nautilus.',
'Cuttlefish, along with most cephalopods, are the ocean’s most intelligent invertebrates.',
Expand Down Expand Up @@ -1219,7 +1235,7 @@ def animalfactsbot(reddit):
'Water, as well as salts, can also be moved through the skin of an earthworm by active transport.',
'Earthworms have the ability to regenerate lost segments, but this ability varies between species and depends on the extent of the damage.',
)

EARWIG_FACTS = (
'There are nearly 2,000 different species of earwig.',
'Although earwigs are able to fly, they often don\'t.',
Expand Down Expand Up @@ -3099,7 +3115,7 @@ def animalfactsbot(reddit):
'The tuatara was the inspiration for a DC Comics superhero, also with a third eye, called Tuatara, member of the Global Guardians.',
'The Tuatara hypercar, designed and manufactured by SSC North America in Tri-Cities, Washington, is named after the reptile, noting its fast evolving DNA and "peaks on the back" as inspiration in the creation of the car.',
'In Māori legends, tuatara are thought to be messengers of Whiro, the personification of darkness and evil.',
'Tuatara are considered to be living fossils, a living animal which closely resembles animals known only from the fossil record.',
'Tuatara are considered to be living fossils, a living animal which closely resembles animals known only from the fossil record.',
'Tuatara can be a range of colors, olive green, brown, or orange-red, and their coloring can change throughout its life.',
)

Expand Down Expand Up @@ -3240,7 +3256,7 @@ def animalfactsbot(reddit):
'Blue whale can produce the loudest sound of any animal. At 188 decibels, the noise can be detected over 800 kilometers (500 miles) away.',
)

WILDEBEEST_FACTS = (
WILDEBEEST_FACTS = (
'Wildebeest are one of the largest antelopes. They can reach 8 feet in length, 4.5 feet in height and weigh up to 600 pounds.',
'Between January and March, half a million wildebeest are born each year in the Serengeti. February, is the month with the most babies, around 8,000 are born each day.',
'During migration, wildebeests travel between 500 and 1000 miles. Timing of migration is determined by weather conditions, but it usually takes place during the months of May and June.',
Expand Down Expand Up @@ -3378,6 +3394,7 @@ def animalfactsbot(reddit):
CRANE_FACTS,
CRAYFISH_FACTS,
CROCODILE_FACTS,
CROW_FACTS,
CUTTLEFISH_FACTS,
DEER_FACTS,
DEGU_FACTS,
Expand Down