mrkrabs.rb - Self Voting Bot

in #radiator6 years ago

Mr. Krabs is a reimplementation of Dr. Phil, but instead of voting for new articles, it self-votes for posts and comments you write, after certain rules are met. By default, it votes for posts that reach 60 votes or is 6 days old. The default for comments is 6 votes or 6 days old.

Features

  • YAML config.
    • voting_rules
      • vote_weight a static percentage (like 100.00 %)
      • history_limit used to set how far back to look in account history.
      • enable_comments option to vote for post replies (default false).
      • min_post_age allows you to only upvote once a post has reached a certain age
      • min_comment_age allows you to only upvote once a comment has reached a certain age
      • min_post_votes allows you to only upvote once a post has reached a certain number of votes
      • min_comment_votes allows you to only upvote once a comment has reached a certain number of votes
      • poll_time how often to check for new content (in seconds)
    • accounts List of accounts to vote on, e.g: account wif
      • Or use accounts: accounts.txt
        • The format for the file is just: account wif (no leading dash, separated by space)

Overview

The goal is to vote after the rules have been met. Setting 60 votes or 6 hours will have Mr. Krabs vote in either situation, whichever happens first.


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

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:

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]

Setup

First, clone this gist and install the dependencies:

$ git clone https://gist.github.com/acc37590f160842afb5528eb2c63a636.git mrkrabs
$ cd mrkrabs
$ bundle install

Then run it:

$ ruby mrkrabs.rb

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


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 --all
$ git pull --rebase
$ git stash pop

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


Troubleshooting

Problem: What does this error mean?
mrkrabs.yml:1: syntax error, unexpected ':', expecting end-of-input
Solution: You ran ruby mrkrabs.yml but you should run ruby mrkrabs.rb.

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

Make sure the .yml file voter items have the account name, followed by a space, followed by the account's WIF posting key. Also make sure you have removed the example accounts (social and bad.account are just for testing).

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, see:

https://steem-third-party.github.io/steem-servers/





Image Source: ekarasz.deviantart.com

See my previous Ruby How To posts in: /f/ruby

Get in touch!

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

License

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

Sort:  

I suppose there is no need to rehash it, but I will do so anyway. I am not losing sleep at night over the the long term success or failure of Steemit. However, let us assume that one's goal is to create wealth from Steemit rather than to build it as a social platform. Does it not follow that using this class of tools is kind of like shooting yourself in the foot?

In order to create wealth it must continue to exist, and this type of tool seems to undermine its continued growth...especially if it should ever be simplified enough for the general population. It seems (intuitively) that the majority of everyday users would think this is just BS. Maybe I am wrong?

I like to blog from time to time (depending on the year), but I also enjoy that I am profiting from it. If the profit stops I will move my content to another location even if it is not profitable.

Does it not follow that using this class of tools is kind of like shooting yourself in the foot?

I'm not sure what you mean. Do you mean that most people cannot run this kind of bot? Or that this kind of bot is not good for the platform? Or both?

I have found that bots I design in ruby are sometimes ported to other languages, in some way or another. I see this as a proof of concept. Almost a specification for other designs that might be easier to use.

In the case of self-voting, if you always post good content, you should always self-vote. In some ways, this bot reinforces the need to always post good content since, at least for me, it's just automating something I already do. I'm just documenting it here.

I actually meant in the sense that it may not be good for the platform. "If you always post good content" sounds great, but WTF is "good content"? A meme? I see what you are saying though .I think if "good content" is defined as content which generates traffic to Steemit > votes > currency then it makes perfect sense. If you get into some definition of "good content" based on aesthetics it quickly becomes a "don't piss down my back and tell me it's raining" situation.

If something is possible to do, somebody will do, @inertia just make it open source. If Steem will fail for that probably it's because it wasn't designed well.

That's a decent point as well. If there's a flaw, it will eventually be reflected in the market price until the flaw is addressed.

If it's something that just cannot be fixed, then the market will correct until it finds equilibrium.

Yes, you're absolutely right. It's subjective. But the neat thing is, I get to use my own stake to decide what I think is good.

Can someone buy stake, then post jibberish and upvote it? Absolutely. They are at risk of other people downvoting it. For me, I like to mitigate that risk by at least considering what others might view as good content.

Loading...

I really do not know about Mr krabs, well it sounds amazing, it seems this bot workes with perfection, 6 votes 6 days then bang! The upvote comes?

Well I must say it's really unique I want to know if you've really 100% used it?

Is there any downside to it?

Oh it s a great innovation for an awesome bot..I will install it thanks for all this har work0

Mr Krabs could prove useful for juicy payouts. Was the program written by you? If so, a big big congrats. Awesome job well done

Sir, Those who have less steem power will have a problem with self vote?

Very interesting! Impressive seeing how these bots are set up. Upvoted, followed and Resteemed by @cryptoryno33

wow.... wonderful post @inertia . i like your post to much. thanks for share the post.

Uhm... I still don't know how to use it. Is it like catfacts where you call it by tagging or comments?

very inspiring, stop at account @ftryfitri aids vote yes