It feels good to give back and support people who have influenced my life trough their work.
I really like the Patreon model. It allows people to support their favorite creators with monthly recurring payments.
So I was thinking about how could I apply a recurring model on Steemit?
Automatically upvote, and thus support favorite creators
My first, naive thought was to auto-upvote all the people I'm following, and thus contribute back to them in a way. I had some spare time today, so I wrote a proof of concept script in Python (source code below).
It works pretty well, but...
How can I support my favorite steemit bloggers without relying on upvotes?
These people have been working hard on creating something that contributes to my life, and my $0.001 upvote doesn't feel like a proper way to reciprocate (I'm still a little fish around here).
So why not buy them a coffee every time they publish something new?
# send $2 in SBD
def send_a_tip(author):
steem = Steem(wif=active_key)
steem.transfer(author, 2.0, "SBD", memo="I love your blog. Here is a small gift for you.", account=account)
Full Source Code
from piston.steem import Steem
from piston.steem import BroadcastingError
# my favorite blogs on steemit
top_writers = ["jl777", "xeroc", "dantheman", "pfunk", "arhag", "void", "abit", "jesta"]
# add my favorites
# shoutout to my lil sister @mwpower, she loves to write but gets discouraged fast
my_favorites = ["mwpower"]
my_subscriptions = top_writers + my_favorites
account = "furion"
posting_key = "my_private_posting_key"
active_key = "my_private_active_key"
upvote_history = []
def feed():
print("Waiting for new posts by %s\n" % my_subscriptions)
steem = Steem(wif=posting_key)
for comment in steem.stream_comments():
if comment.author in my_subscriptions:
# Comments don't have titles. This is how we can know if we have a post or a comment.
if len(comment.title) > 0:
# check if we already upvoted this. Sometimes the feed will give duplicates.
if comment.identifier in upvote_history:
continue
print("New post by @%s %s" % (comment.author, url_builder(comment)))
try:
comment.vote(100, account)
print("====> Upvoted")
upvote_history.append(comment.identifier)
except BroadcastingError as e:
print("Upvoting failed...")
print("We have probably reached the upvote rate limit.")
print(str(e))
if comment.author in my_favorites:
send_a_tip(comment.author)
print("====> Sent $2 SBD to @%s" % comment.author)
# send $2 in SBD
def send_a_tip(author):
steem = Steem(wif=active_key)
steem.transfer(author, 2.0, "SBD", memo="I love your blog. Here is a small gift for you.", account=account)
def url_builder(comment):
return "https://steemit.com/%s/%s" % (comment.category, comment.identifier)
if __name__ == "__main__":
while True:
try:
feed()
except (KeyboardInterrupt, SystemExit):
print("Quitting...")
break
except Exception as e:
print("### Exception Occurred: Restarting...")
You will need Python 3 and Piston to run.
python3 upvote_bot.py
Todo
I will be adding an aggregator that sends me an email report containing all the posts I've upvoted, so I can read them before going to bed.