utopian-io/utopian-bot

Name: utopian-bot

Owner: Utopian.io

Description: Utopian bot that votes from the spreadsheet.

Created: 2018-05-12 19:56:31.0

Updated: 2018-05-24 09:36:38.0

Pushed: 2018-05-24 09:36:36.0

Homepage: null

Size: 33

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

utopian-bot

Utopian bot that votes from a spreadsheet.

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

thon -m venv venv
venv/bin/active
env) 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

 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 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

empy createwallet --wipe
empy 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 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).

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

CK="123456"
* * * * /home/amos/Documents/utopian-bot/venv/bin/python /home/amos/Documents/utopian-bot/unvote_bot.py

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.