Coder Social home page Coder Social logo

utopian-bot's Introduction

utopian-bot

Contains Python scripts used to handle all things related to the @utopian-io account's voting, unvoting, resteeming etc.

Installing

The Utopian bot was made using Python3.6. For a quick and easy way to install it is recommended you install the Anaconda Distribution.

Python packages

Once Python is installed you can install the required packages in your virtual environment like so

$ python -m venv venv
$ . venv/bin/active
$ (venv) pip install -r requirementx.txt

If you encounter any problems while installing the Python packages you might be missing some other required packages. On Ubuntu you can solve this by installing the following packages

sudo apt-get install build-essential libssl-dev python-dev

Sheet API

Since the bot also works with Google sheets you will need create a project in Google's API manager and add the Google sheet API to the project. Once created you will also need to add credentials to the project and make it so application data is accessible by selecting that option.

Next you will need to create a service account with the project editor role. Clicking continue will generate a JSON file that you should add to the project's folder and rename it client_secret.json. In this file there should be a key called "client_email" - you should share the spreadsheet with this email address.

Usage

Once everything has been installed you need to set up your beem wallet and import the account you want to use. This can be done as follows

$ beempy createwallet --wipe
$ beempy importaccount --roles posting <account>

After this you should set up your crontab with crontab -e. It's important you use the full path of both Python and the script, which you can find with which python and realpath utopian_bot/upvote_bot.py. You should also set the UNLOCK environment variable inside the crontab itself so it unlocks the wallet automatically (so this should be the wallet's password you set earlier).

For the trail an IBM Watson account is used, so inside the crontab the environment variables WATSON_USERNAME and WATSON_PASSWORD must be set for the username and password respectively.

If you want to run the bot every 5 minutes for example your crontab file will look something like this

UNLOCK="123456"
WATSON_USERNAME="username"
WATSON_PASSWORD="password"
*/5 * * * * /home/amos/Documents/utopian-bot/venv/bin/python /home/amos/Documents/utopian-bot/utopian_bot/upvote_bot.py

That's it! If you have any questions you can contact me on Discord at Amos#4622.

utopian-bot's People

Contributors

amosbastian avatar crokkon avatar mwfiae avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.