kvarak / htstatus

Still being built up...
http://ht.kvarak.net
Apache License 2.0
1 stars 0 forks source link

HT Status

Usage

This tool is hosted by me on https://ht.kvarak.net/ and you can freely us it there.

I don't have any more instructions for running it locally except what is loosely described below.

Configuration

You need a config.py file in the base folder with the following config:

import os

class Config(object):
  APP_NAME                 = 'your-app-name'
  SECRET_KEY               = 'you-will-never-guess'
  CONSUMER_KEY             = 'you-will-never-guess'
  CONSUMER_SECRETS         = 'you-will-never-guess'
  CALLBACK_URL             = 'url-to-your-callback'
  CHPP_URL                 = 'https://chpp.hattrick.org/chppxml.ashx'
  SQLALCHEMY_DATABASE_URI  = 'postgresql:///<dbname>'
  SQLALCHEMY_TRACK_MODIFICATIONS = False
  DEBUG_LEVEL              = 3 # 0=none, 1=info, 2=debug, 3=full

Database

SQLAlchemy

Create

python manage.py db init
python manage.py db migrate
python manage.py db upgrade

Upgrade

python manage.py db migrate
python manage.py db upgrade

On problems

python manage.py db stamp head

Postgres

Create

CREATE DATABASE htplanner;

Check

$ psql
# \c htplanner
# \dt
# \d results

Requirements

pip3 install flask-script
pip3 install psycopg2-binary
pip3 install python-dateutil

Manage requirements

pipreqs . --force
pip install -r requirements.txt

Start

nohup ./run.sh 5000 &