Tools:
======

fetchImagesAndList.pl:
  The script downloads all images of the specified set from the Gatherer
  and creates a corresponding set.list file.

htmlspoiler2txt.pl <spoiler.html> [<oracle.txt>]:
  The script creates an oracle.txt file from a given html spoiler.
  Html spoilers are better because they contain more information than the
  text spoilers or oracle texts. (eg. missing ":" after an ability etc)

spoil_to_xml.pl <set.list> <set.xml>
  The script creates a set.xml file from a given set.list and the oracle.txt
  (a corresponding working oracle.txt should be in the same directory).

oracle_html2txt.pl <oracle.html> <oracle.txt> (DEPRECATED):
  This script creates an oracle.txt file from a given txt spoiler (txt
  spoiler still come as html in the gatherer).
  => Use htmlspoiler2txt.pl instead!

Gatherer-Link:
  http://ww2.wizards.com/gatherer/



Procedure to install a new set:
===============================

Oracle text:

(0. Alternatively you can use a normal oracle.txt file instead of converting
   one from html if a good version is available...)

1. Find a recent html spoiler from Wizard's Gatherer (type: "Spoiler"):
   http://ww2.wizards.com/gatherer/Index.aspx?setfilter=YourSetName&output=Spoiler
   => Save as spoiler.html

2. Run ./htmlspoiler2txt.pl spoiler.thml oracle.txt
   => oracle.txt the oracle file in text form

3. Check oracle.txt for errors and fix them manually (eg. split cards!)


Images + Image List:

1. Manually edit fetchImagesAndList.pl accordingly:
   Set name/etc and eventually some manual changes are necessary...

2. To get the set images and list file run ./fetchImagesAndList.pl
   => SET/ directory containing the images
   => set.list containing the image list

3. Check and correct errors: To avoid downloading all images or the spoiler
   again do_* variables can be set to 0 accordingly to leave out the
   corresponding step.


XML File:

1. Run ./spoil_to_xml.pl set.list set.xml
   => set.xml the final xml file

2. Try to fix errors that occured during the conversion.
   Sometimes it's necessary to update oracle.pm parsing...

3. Manually improve set.xml!! (eg. 1 -> {1} mana symbol changes)


Final Installation:

1. Copy the set.xml file to gccg/xml/Mtg/set.xml

2. Modify gccg/xml/mtg.xml to load set.xml

3. Copy the SET/ directory with the graphics to gccg/graphics/Mtg/SET/

4. Run gccg and check if all images of the set are shown and if all card
   text and properties are as they should => fix accordingly. 


There is also the possibility to automatically generate all files using 
a Makefile but as manual changes are almost always necessary this is
rarely used...
