Wanted to make your *first STEEM bot* ? Here is a Step-by-Step begginer's guide for you !

in #steemit7 years ago

Prior Knowledge Requirement

  1. Executing simple commands on Command prompt: A very basic knowledge is required. In fact, even if you have never opened command prompt in your life, still, with some effort you can accomplish this task.

  2. Admistrative access to your computer: You must have full administrative access to your computer. With partial access, it may be difficult installing steem piston.

  3. A Mac or Linux running machine: This guide is specifically tailored for mac users. Although most steps would be similar and this guide can definitely benefit everyone, but some requirements would be different for windows users. Windows users should first check out this guide about installing steem-piston and python on Windows 7. After installation these, you can follow the rest of the steps to create your own steem bot.

Let's Begin

About Steem Piston

You may be aware that steem-piston is a revolutionary new tool developed by @xeroc. In fact, you should check out his original guide called Piston - The Swiss army knife for STEEM to installing and using steem-piston. You can do tons of things with this baby including making your own steem bot.

Step-by-Step process.


A general idea about the steps to be followed:

  1. Downloading and Installing Anaconda. Anaconda is a python platform. We will be installing Python version 3.6. It is important to note that python version should be 3.x. It is a very important instruction. steem piston library which we will use for making our first steem bot does not work with Version 2.x. Note that original steem python document has advocated using Anaconda.

  2. Python 3.6 version will be installed automatically with anaconda. Later at the time of running the code for bot: If the code you want to run needs modules that did not come as standard with anaconda. Install those Packages through. For info read this material and this 30 min quick start guide for Anaconda.

  3. Installing git if not already installed. Note that on OS version Mavericks (10.9) or above, git can be used from command prompt directly. If you are on an older mac, read this page.

  4. Installing dependencies pyyaml (like this) and asyncio (like this)packages. They can be installed from command line or through anaconda navigator. Read documentation of Anaconda for installing these packages through anaconda. It is quite intuitive so you may just try to figure it out yourslef. Or use command line. Note that using the mac terminal may not be good idea as their is some issue related to PATH. So, what you need to do is, open anaconda navigator and use conda terminal.
    The conda terminal can be accessed like this:
    conda termial

  5. Installing openssl for mac. This is the only method that worked for me for installing openssl. Make sure you enter the exact commands in the command prompt. This is a non standard method so there may be some associated risks. If you can find a better method for installing openssl on windows do let me know.

  6. Installing piston library and piston-cli. Follow steps exactly as mentioned in the this documentation for piston library and this documentation for piston-cli. Sroll to the lower part of the page for installation instructions. I used manual installation steps as apt-get cannot be used on mac directly.

  7. Learn Working with Jupyter Notebook. It comes as standard with anaconda and can be efficiently utilized to organize and record your coding workflow and outputs. Using Jupyter Notebook is beneficial if you plan on learning coding however it is optional and you can very well use conda terminal. Here check out this walktrhough video on using Jupyter Notebook.

  8. Make your bot: I used this tutorial and ran the code on conda terminal. If you do not know how to run a python file through terminal, go through python tutorial "Learn Python the Hard Way". Many more such codes for bots are available online. Do explore them.

Hint: if suppose the name of file in which you have kept your code is abc.py (note: all pyhton files are .py files) , go to the directory in which the file is located using cd and use the command mentioned below on terminal:

python abc.py

FYI: Debian-based distribution like Ubuntu etc. can use apt-get. With mac you can't use apt get. However, I found their is a thing called homebrew that makes code meant for ubuntu be used on mac. More discussion on this is irrelevant here.

What Next !


  • Ethical Hacking: Read this story of How these guys hacked 11 accounts worth $21,000 just to protect them from evil hackers. These white hat or ethical hackers have come to rescue of steem blockchain at times of need. Oh, the lure of (ethical) hacking !!

  • Adding custom scripts and styles Steemit !: Yes it is infact quite possible. See thispost about adding custom scripts and styles to steemit. SO, you can get more out of steemit.

  • Make life easier: There are many custom scripts for claiming rewards to automatic voting. You can use them freely to make life a little easier. If you progress some more, you could write your own script for fun !!

Epilogue:

We have learnt how to install steem libraries and steem-cli and deploy a bot. I hope you can have fun with your bot the way I do.

Sort:  

This post has received a 0.03 % upvote from @drotto thanks to: @banjo.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by thorough_research from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

This is the most helpful beginner guide I have read trying to learn to code with python and interact with STEEM blockchain. I found your post just in the right moment before I gave up on python using Mac.

Very detailed and simple at the same time. It definitely gave me a good start!
it's an old post but I liked it and followed you
Thanks a lot.

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 58757.77
ETH 2554.49
USDT 1.00
SBD 2.52