Read Me
# Time-stamp: < README.org (2016-04-17 14:27) >
#+TITLE: MCC
#+AUTHOR: martin.slouf (martinslouf@sourceforge.net)
#+OPTIONS: ^:nil
#+LANGUAGE: en
* Description
Magic (the Gathering) Card Collection is online card database, card search
and deck builder tool as well as card collection organizer. It contains
data that is Copyright © Wizards of the Coast - All Rights Reserved.
Python3 is required.
Project web page: http://sf-mcc.sourceforge.net/.
* Installation
** Installing from PyPI (Python Package Index)
#+BEGIN_SRC sh
pip install mcc
#+END_SRC
** Installing from source distribution
Installation uses Python /setuptools/ -- just run from distribution top
dir:
#+BEGIN_SRC sh
python setup.py install
#+END_SRC
or you may prefer
#+BEGIN_SRC sh
python setup.py install --prefix=/usr/local/
#+END_SRC
This will copy the package into appropriate directory for third-party
modules of your Python installation.
** Initial setup
#+BEGIN_SRC sh
# create default config files & download current datafiles
python -m mcc init
# run application (starts http server)
python -m mcc flaskui
#+END_SRC
** Setting up a development/runtime environment on Debian GNU/Linux
#+BEGIN_SRC sh
# install base python packages from your distribution repo
aptitude install python3 python3-dev python3-venv
# install those dependencies in order to compile required native
# Python packages for your platform
aptitude install libxml2-dev libxslt1-dev libpq-dev
# crate virtual environment with pyton3 interpreter
target=~/.virtualenvs/python3-mcc
python3 -m venv $target
cd $target
source bin/activate
# install mcc requirements
pip install summer psycopg2 pyquery flask redis wtforms
# install additional packages to ease development (if required)
pip install pylint autopep8 nose ipython pgcli
# clone the mcc repo to the directory of your choice
git clone git://git.code.sf.net/p/sf-mcc/code mcc
# create default config files & download current datafiles
cd mcc
python -m mcc init
#+END_SRC
* Files and Directories
#+BEGIN_EXAMPLE
# tree --charset ascii --dirsfirst -L 1 -F
DIST ARCHIVE, not SOURCE ROOT
#+END_EXAMPLE
* Documentation
Reference documentation can be generated by /sphinx/ tool from source tree
and placed in file:doc/html/index.html. It is also accessible through
project web page: http://sf-mcc.sourceforge.net/.
** Test suite
Once you checked out the sources, you can run tests from within the top
directory:
#+BEGIN_SRC sh
git clone git://git.code.sf.net/p/sf-mcc/code mcc
cd mcc
make clean tests
#+END_SRC
Commands above will clone official Git repository and execute popular
Python test runner ~nosetests3~ (nosetests for Python 3).
* Changelog
** 2016-03-11
- flask mtgjson search moved to flask blueprint
** 2015-07-18
- flask web interface (just card search) introduced
** 2015-07-17
- migrated to Python 3 and new version of summer
- cli interface improved
** 2014-08-09
- OCR card database is being replaced with much more developer friendly project:
- http://mtgjson.com/
- http://mtgimage.com/ (being shutdown by Wizards of the Coast)
* Thank you list
- http://mtgjson.com/ -- complete card database, no need to parse Gatherer anymore!
- http://mtgsalvation.gamepedia.com/Main_Page -- great resource for anything Magic
- http://magiccards.info/ -- as a resource for card images not to be found in Gatherer
(cards without multiverse id, ie. various bonus printings and specials)
* TODO Todo list
- [X] revisit options -- MTGJSON, OCR
- [X] create subcontext for each component?
=> no, leave single global context
- [ ] OCR checklist download is now using pagination -- download page=0 + page=1
- [ ] card images from magiccards.info
- [X] casual supertypes
- [X] supertype Ongoing
- [X] casual card types
- [X] card type Enchant
- [X] card type Eaturecray
- [-] mtgjson ui
- [X] move current ui to blueprint 'mtgjson'
- [X] add http://magic.wizards.com/en/game-info/products/card-set-archive to menu
- [X] add link to comprehensive rules
- [ ] card detail
- [ ] rulings
- [ ] print loyalty as bootstrap <label/>
- [ ] replace mana/card symbols in card rulings
- [ ] sort printings by edition, print variations together (basic lands)
- [ ] any time there is a card detail/image/... allow adding to bag
- [-] card grid
- [ ] in paging, if many pages, instead of 1 ... X use First/Last
- [ ] search by cmc
- [X] show formatted rulings over image/card name in hover
- [X] printing as set icon with appropriate rarity indication, text in alt text
- [ ] replace MTGJSON search with sqlite one
- [ ] create new blueprint 'orm'
- [ ] sqlite -> orm/sql?
- [ ] register as blueprint
- [ ] login through openid/google/facebook/... other openid providers
- [ ] add support for custom info in sqlite, that will survive complete card database purge (soft link with 'card_name' + 'edition')
- [ ] support for deck listings (deck [name, format, cards-in-deck])
- [ ] card tags (bounce, cantrip, creature removal, board wipe, see http://mtgsalvation.gamepedia.com/Category:Magic_slang for inspiration)
- allow users to add those tags (admin can remove them, and if ever removed, cannot be added again, only by admin)
- [ ] multiple bags
- [ ] bag types (commander deck, standard deck (+ legality), draft deck)
- support for:
- validation of cards in deck (legality)
- optimal mana base
- [ ] persist bags
- [ ] bag statistics (mana curve, card tags)
- [ ] python -m mcc init selze kvuli l10n