SpeedTech is a website for finding speedrunning clips and strategies. The goal is to get all of the clips scattered around Twitter, YouTube, and Twitch and compile them all into one location where people can easily find them.
git clone https://github.com/Krankdud/speedtech
virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -e .
export FLASK_APP=speeddb.application
flask init_db
flask run
The server should be running on localhost:5000
Create a directory named "instance" in the same directory as setup.py. Add configuration settings to "instance/application.py"
Setting | Explanation |
---|---|
ENABLE_LOGGING | Set to true to enable logging |
LOG_FILENAME | Path to the log file |
SQLALCHEMY_DATABASE_URI | Database URI. Determines the type of SQL database and specifies the location of the database. Check the SQLAlchemy documentation for which databases are supported |
WHOOSH_INDEX | Directory to store the Whoosh index |
OEMBED_CACHE_TYPE | Type of cache to store the oEmbed contents in. Options are "simple", "memcached", and "file" |
OEMBED_CACHE_FILE_DIRECTORY | Directory for the oEmbed cache. Must be set if OEMBED_CACHE_TYPE is "file" |
OEMBED_CACHE_TIMEOUT | Time in seconds for contents in the oEmbed cache to become invalid |
STATSD_HOST | IP or hostname for the statsd instance. Used for collecting metrics |
STATSD_PORT | Port for the statsd instance |
STATSD_PREFIX | Prefix used to differentiate the captured metrics from other metrics |
RECAPTCHA_PUBLIC_KEY | Public key for reCAPTCHA |
RECAPTCHA_PRIVATE_KEY | Private key for reCAPTCHA |
Other Flask configuration also belongs in this file. Check the documentation for each of the plugins for configuration values:
Tests use the standard Python unittest module and can be run using:
python setup.py test
or
coverage run setup.py test