Cat Facts

in #radiator7 years ago (edited)

Cat Facts is a fork for Freakazoid that uses Cat Facts API responses to STEEM as bot replies. Unlike Freakazoid, this bot works without having to register for an API key.




This bot will automatically reply to posts and comments that reply to and mention the bot. The replies are provided by the Cat Facts API.

The main reference implementation of Cat Facts is @catfacts. For example:




Install

To use this Radiator bot:

Linux
$ sudo apt-get update
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ sudo apt-get upgrade
$ gem install bundler
macOS
$ gem install bundler

I've tested it on various versions of ruby. The oldest one I got it to work was:

ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-darwin14.4.0]

You can try the system version of ruby, but if you have issues with that, use this how-to, and come back to this installation at Step 4:

Setup

First, clone this git and install the dependencies:

$ git clone https://github.com/steem-third-party/catfacts.git
$ cd catfacts
$ bundle install
Configure

Edit the config.yml file.

:freakazoid:
  :block_mode: irreversible
  :account_name: <your STEEM bot name>
  :posting_wif: <your STEEM bot posting key>

:chain_options:
  :chain: steem
  :url: https://steemd.steemit.com

Edit the support/reply.md template (optional).

Run Mode

Then run it:

$ rake run

Cat Facts will now do it's thing. Check here to see an updated version of this bot:

https://github.com/steem-third-party/catfacts


Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

$ git pull

Usually, this works fine as long as you haven't modified anything. If you get an error, try this:

$ git stash
$ git pull
$ git stash pop
$ bundle install

If you're still having problems, I suggest starting a new clone.


Troubleshooting

Problem: Everything looks ok, but every time Cat Facts tries to reply, I get this error:
Unable to reply with <account>.  Invalid version
Solution: You're trying to reply with an invalid key.

Make sure the .yml file contains the correct voting key and account name (social is just for testing).

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, special thanks to @ripplerm.

https://ripplerm.github.io/steem-servers/


Tests

  • Clone the client repository into a directory of your choice:
    • git clone https://github.com/inertia186/catfacts.git
  • Navigate into the new folder
    • cd catfacts
  • Basic tests can be invoked as follows:
    • rake
  • To run tests with parallelization and local code coverage:
    • HELL_ENABLED=true rake

Get in touch!

If you're using Cat Facts, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and Discord.

License

I don't believe in intellectual "property". If you do, consider Cat Facts as licensed under a Creative Commons CC0 License.

Sort:  

when i saw picture I thought will find informations about cats lol.. anyway thanks for sharing

Cats do not think that they are little people. They think that we are big cats. This influences their behavior in many ways.

Kittens remain with their mother till the age of 9 weeks.

Most cats had short hair until about 100 years ago, when it became fashionable to own cats and experiment with breeding.

All you have to do is mention @catfacts. ;)

In just 7 years, one un-spayed female cat and one un-neutered male cat and their offspring can result in 420,000 kittens.

çok ilgi çekici

Cats should not be fed tuna exclusively, as it lacks taurine, an essential nutrient required for good feline health. Make sure you have the proper Pet supplies to keep your cat happy and healthy.

About 37% of American homes today have at least 1 cat.

Yes, taurine is a vital nutrient, and is found in many cat foods.

A cat’s brain is biologically more similar to a human brain than it is to a dog’s. Both humans and cats have identical regions in their brains that are responsible for emotions.

ahahah you are right.. thanks for upvoting my comment.

You don't even have to do that. Just tag a post with cats. If it upvoted posts, it'd be tolerable. But it's pretty obnoxious to spam every cat post on Steemit.

spam cats ahaha

Aha, but even if using cat as tag/topic it will bring it over. :D

Oh Kittyfacts, I hope you have not gone away...I greatly enjoy @catfacts

I thought this post was going to be about cats!

More facts, @catfacts!!

Siamese kittens are born white because of the heat inside the mother's uterus before birth. This heat keeps the kittens' hair from darkening on the points.

@catfacts please!

According to a Gallup poll, most American pet owners obtain their cats by adopting strays.

HAHAHA AWESOME! They just educated me on one of my posts! So if I am in a bind at a cat convention or a zoo I will just @catfacts in a comment.

A cats field of vision is about 185 degrees.

THE MOST SHITTY BOT OUT THERE!

Spamming my comment section 20X times

Probably because the author edited their post 20 times. :D

lolz are you stupid or something=?

I posted my post and got 3 comments in 60sec..

After this, every comment made by other folks this shit bot came... Feel free to check my last Caturday blog... But I have a feeling you don't care, maybe you will next week when I get like 30, 40K of SP and will have some extra % to put that bitch on downvote watch ;)

Stay awesome:P

No need to become rude :)

"Probably because the author edited their post 20 times. :D"

YES I AM EDITING A POST WITH 2 PHOTOS, 20x times...

Btw I was making a joke, while stating the FACTS! I'm not butthurt...

But seeing it screwing things up not just on my posts, makes the thing a little more annoying... But otherwise, I could care less if the damn thing never works...


PS: Another joke.

Yeah, it seems like there might be a bug in my script. But you're so rude, I don't feel like troubleshooting the problem. Enjoy.

Rude? lolz Dude get yourself checked... Did you ever hear of humor?

Whatever, I will have a blast here if you do something about it or not... I'm just stating the FACTS. Maybe you shouldn't be so butthurt and make your BOT better for the sake of cats... Ciao

some people are always rude... I am not rude I nly want to ask if you would consider a witness vote for me. Your vote can change my life. Check my witness profile. I really hope you vote for me if you have a spare one left.. and I would be so thankfull

kesinlikle öyle

OIt won't take long for many to hate your API

YOUR PRODUCT IS A SPAM BOT OVERLOADING MY MESSAGES AND MESSING UP ALL POSSIBLE HUMAN FEEDS. lEAVE @whoib alone and stop using the key word cat for spamming

Very nice and good information!! Thank You @catfacts

In ancient Egypt, when a family cat died, all family members would shave their eyebrows as a sign of mourning.

Oh kitty facts, I hope you have not gone away. Tell me it is not so...

If you are in for cats fact,then you have to bring real fact about all cat species @catfact

My favorite cat animal

I like cats..& i love a low cats