Skip to content
steembasicincome - scripts for python
Python TSQL Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sql
steembi
systemd
tests
.gitignore
LICENSE
README.md
check_blacklist.sh
sbi_build_member_db.py
sbi_check_blacklist.py
sbi_check_delegation.py
sbi_check_member_db.py
sbi_check_trx_database.py
sbi_maintainance.py
sbi_reset_rshares.py
sbi_store_member_hist.py
sbi_store_ops_db.py
sbi_stream_post_comment.py
sbi_stream_test_data.py
sbi_transfer.py
sbi_update_curation_rshares.py
sbi_update_member_db.py
sbi_update_trx_database.py
sbi_upvote_post_comment.py
sbirunner.sh
setup.py

README.md

steembasicincome

python scripts for automation of steembasicincome

How to start

Installation of needed packages

The following packages are needed, when running the scripts on Ubuntu:

apt-get install libmariadbclient-dev
pip3 install beem dataset  mysqlclient

Compile and install steembi, the helper library for all steembasicincome scripts

python setup.py install

Prepare the database

mysql -u username -p sbi < sql/sbi.sql
mysql -u username -p sbi_steem_ops < sql/sbi_steem_ops.sql

Creating a service script

Main runner script can be automatically run through systemd:

useradd -r -s /bin/false sbiuser
chown -R sbiuser:sbiuser /etc/sbi

cp systemd/sbirunner.service to /etc/systemd/system/


systemctl enable sbirunner
systemctl start sbirunner

systemctl status sbirunner

The blacklist script is run once a day:


cp systemd/blacklist.service to /etc/systemd/system/
cp systemd/blacklist.timer to /etc/systemd/system/

systemctl enable blacklist.timer
systemctl start blacklist.timer

systemctl list-timers

Config file for accesing the database

A file config.json needs to be created:

{

        "databaseConnector": "mysql://user:password@localhost/sbi_steem_ops",
        "databaseConnector2": "mysql://user:password@localhost/sbi",
        "mgnt_shares": {"josephsavage": 3, "earthnation-bot": 1, "holger80": 1}
}

Running steembasicincome

The following scripts need to run:

python3 sbi_upvote_post_comment.py
python3 sbi_store_ops_db.py
python3 sbi_transfer.py
python3 sbi_update_member_db.py
python3 sbi_store_member_hist.py
python3 sbi_update_post_count.py
python3 sbi_stream_post_comment.py
python3 sbi_check_delegation.py

You can’t perform that action at this time.