bakert / enlightened-tutor

Program that checks Magic: the Gathering cards for tournament playability and other interesting facets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enlightened-tutor

Program that checks Magic: the Gathering cards for tournament playability and other interesting facets

MIT License

(c) 2024 Thomas David Baker bakert@gmail.com

Setup

  • Install Python
  • $ git clone https://github.com/bakert/enlightened-tutor
  • $ cd enlightened-tutor
  • $ python3 -m venv .
  • $ source bin/activate
  • $ pip install -r requirements.txt
  • $ pre-commit install
  • Install mariadb
  • $ mysql
  • mysql> CREATE USER 'enlightened_tutor'@'localhost' IDENTIFIED BY 'YOUR-PASSWORD-HERE';
  • mysql> GRANT ALL ON enlightened_tutor.* TO 'enlightened_tutor'@'localhost';
  • Run the SQL in enlightened-tutor.sql, or (better) restore a backup from data/ (after gunzipping)
  • Copy config.ini.example to config.ini and fill in the database information

Web Server

  • $ bin/uvicorn web:app --reload --log-level info --port 8000 (Note: this will not give interesting results until the database is populated)

Populate Database

  • Restore latest file in data/ to avoid hours of requests
  • $ python3 mtgtop8.py # You can kill this once it starts seeing decks you already have
  • $ python3 -c 'import scryfall; scryfall.import_cards()'
  • $ gunzip data/carddict.json.gz
  • $ python3 -c "import cards; cards.set_playability()"
  • $ python3 -c 'import cubecobra; cubecobra.load()'

About

Program that checks Magic: the Gathering cards for tournament playability and other interesting facets

License:MIT License


Languages

Language:Python 100.0%