Repository for the tools used by the Penny Dreadful Community.
View individual subdirectories for details
analysis is for Magic Online game log analysis.
decksite is the code for pennydreadfulmagic.com.
discordbot is the Discord chatbot.
github_tools are some GitHub integration utillities.
logsite is the code for logs.pennydreadfulmagic.com.
logsite_migrations are alembic database migrations for logsite.
magic is for information about Magic – cards, decklists, card images, legality, etc.
maintenance is for useful scripts, usually run via cron.
modo_bugs is for integration with https://github.com/PennyDreadfulMTG/modo-bugs/issues.
price_grabber builds a database of card prices.
rotation_script is for the script that handles Penny Dreadful rotation (card legality changes each season).
shared contains a bunch of general purpose helper classes. Things that could be used in any project.
shared_web contains a bunch of web-specific helper classes. It also contains our React code for "live" data tables.
Contributions are very welcome. Please join the Discord at https://pennydreadfulmagic.com/discord/ and feel free to ask questions in #code.
The first run will download a copy of the prod decksite db and set it up as well as build cards db from scryfall data so it will take a while.
After this the website is available at http://127.0.0.1/
If you plan on running things outside of the containers (eg: dev.py or logsite):
https://discordapp.com/oauth2/authorize?client_id=<your client id here>&scope=bot
.env.example
to .env
and alter the value for "token" to this value. (or to "token" in config.json if not in docker setup).env
.env
issue the following commands in MySQL (you don't need to create the databases):
There are various levels of granularity but in general use you want:
Check the dev.py source code for the full set of options including unit
, types
, lint
(covered by test
above) as well as functional
(integration tests), perf
(performance tests). release
will take you all the way from your committed change to a PR via the tests (needs GitHub's commandline gh
/hub
installed).
slow_query
, slow_page
and slow_fetch
limits in conifg.json