rewrote oracle importer
This commit is contained in:
parent
af0d72c0e6
commit
ae6803f9f2
10 changed files with 535 additions and 452 deletions
|
@ -72,6 +72,7 @@ public:
|
||||||
QString getCardType() const { return cardtype; }
|
QString getCardType() const { return cardtype; }
|
||||||
QString getPowTough() const { return powtough; }
|
QString getPowTough() const { return powtough; }
|
||||||
QString getText() const { return text; }
|
QString getText() const { return text; }
|
||||||
|
void setText(const QString &_text) { text = _text; }
|
||||||
QStringList getColors() const { return colors; }
|
QStringList getColors() const { return colors; }
|
||||||
QString getPicURL() const { return picURL; }
|
QString getPicURL() const { return picURL; }
|
||||||
QString getMainCardType() const;
|
QString getMainCardType() const;
|
||||||
|
|
|
@ -2008,32 +2008,32 @@
|
||||||
<translation>&Suchen nach:</translation>
|
<translation>&Suchen nach:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="56"/>
|
<location filename="../src/window_deckeditor.cpp" line="60"/>
|
||||||
<source>Deck &name:</source>
|
<source>Deck &name:</source>
|
||||||
<translation>Deck &Name:</translation>
|
<translation>Deck &Name:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="60"/>
|
<location filename="../src/window_deckeditor.cpp" line="64"/>
|
||||||
<source>&Comments:</source>
|
<source>&Comments:</source>
|
||||||
<translation>&Kommentare:</translation>
|
<translation>&Kommentare:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="84"/>
|
<location filename="../src/window_deckeditor.cpp" line="88"/>
|
||||||
<source>Deck editor [*]</source>
|
<source>Deck editor [*]</source>
|
||||||
<translation>Deck-Editor [*]</translation>
|
<translation>Deck-Editor [*]</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="86"/>
|
<location filename="../src/window_deckeditor.cpp" line="90"/>
|
||||||
<source>&New deck</source>
|
<source>&New deck</source>
|
||||||
<translation>&Neues Deck</translation>
|
<translation>&Neues Deck</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="89"/>
|
<location filename="../src/window_deckeditor.cpp" line="93"/>
|
||||||
<source>&Load deck...</source>
|
<source>&Load deck...</source>
|
||||||
<translation>Deck &laden...</translation>
|
<translation>Deck &laden...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="92"/>
|
<location filename="../src/window_deckeditor.cpp" line="96"/>
|
||||||
<source>&Save deck</source>
|
<source>&Save deck</source>
|
||||||
<translation>Deck &speichern</translation>
|
<translation>Deck &speichern</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2042,97 +2042,97 @@
|
||||||
<translation type="obsolete">Deck &speichern unter...</translation>
|
<translation type="obsolete">Deck &speichern unter...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="95"/>
|
<location filename="../src/window_deckeditor.cpp" line="99"/>
|
||||||
<source>Save deck &as...</source>
|
<source>Save deck &as...</source>
|
||||||
<translation>Deck s&peichern unter...</translation>
|
<translation>Deck s&peichern unter...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="98"/>
|
<location filename="../src/window_deckeditor.cpp" line="102"/>
|
||||||
<source>&Print deck...</source>
|
<source>&Print deck...</source>
|
||||||
<translation>Deck &drucken...</translation>
|
<translation>Deck &drucken...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="101"/>
|
<location filename="../src/window_deckeditor.cpp" line="105"/>
|
||||||
<source>&Close</source>
|
<source>&Close</source>
|
||||||
<translation>S&chließen</translation>
|
<translation>S&chließen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="102"/>
|
<location filename="../src/window_deckeditor.cpp" line="106"/>
|
||||||
<source>Ctrl+Q</source>
|
<source>Ctrl+Q</source>
|
||||||
<translation>Ctrl+Q</translation>
|
<translation>Ctrl+Q</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="105"/>
|
<location filename="../src/window_deckeditor.cpp" line="109"/>
|
||||||
<source>&Edit sets...</source>
|
<source>&Edit sets...</source>
|
||||||
<translation>&Editionen bearbeiten...</translation>
|
<translation>&Editionen bearbeiten...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="108"/>
|
<location filename="../src/window_deckeditor.cpp" line="112"/>
|
||||||
<source>&Deck</source>
|
<source>&Deck</source>
|
||||||
<translation>&Deck</translation>
|
<translation>&Deck</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="118"/>
|
<location filename="../src/window_deckeditor.cpp" line="122"/>
|
||||||
<source>&Sets</source>
|
<source>&Sets</source>
|
||||||
<translation>&Editionen</translation>
|
<translation>&Editionen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="121"/>
|
<location filename="../src/window_deckeditor.cpp" line="125"/>
|
||||||
<source>Add card to &maindeck</source>
|
<source>Add card to &maindeck</source>
|
||||||
<translation>Karte zu&m Hauptdeck hinzufügen</translation>
|
<translation>Karte zu&m Hauptdeck hinzufügen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="123"/>
|
<location filename="../src/window_deckeditor.cpp" line="127"/>
|
||||||
<source>Ctrl+M</source>
|
<source>Ctrl+M</source>
|
||||||
<translation>Ctrl+M</translation>
|
<translation>Ctrl+M</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="124"/>
|
<location filename="../src/window_deckeditor.cpp" line="128"/>
|
||||||
<source>Add card to &sideboard</source>
|
<source>Add card to &sideboard</source>
|
||||||
<translation>Karte zum &Sideboard hinzufügen</translation>
|
<translation>Karte zum &Sideboard hinzufügen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="126"/>
|
<location filename="../src/window_deckeditor.cpp" line="130"/>
|
||||||
<source>Ctrl+N</source>
|
<source>Ctrl+N</source>
|
||||||
<translation>Ctrl+N</translation>
|
<translation>Ctrl+N</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="127"/>
|
<location filename="../src/window_deckeditor.cpp" line="131"/>
|
||||||
<source>&Remove row</source>
|
<source>&Remove row</source>
|
||||||
<translation>Zeile entfe&rnen</translation>
|
<translation>Zeile entfe&rnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="129"/>
|
<location filename="../src/window_deckeditor.cpp" line="133"/>
|
||||||
<source>Del</source>
|
<source>Del</source>
|
||||||
<translation>Entf</translation>
|
<translation>Entf</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="130"/>
|
<location filename="../src/window_deckeditor.cpp" line="134"/>
|
||||||
<source>&Increment number</source>
|
<source>&Increment number</source>
|
||||||
<translation>Anzahl er&höhen</translation>
|
<translation>Anzahl er&höhen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="132"/>
|
<location filename="../src/window_deckeditor.cpp" line="136"/>
|
||||||
<source>+</source>
|
<source>+</source>
|
||||||
<translation>+</translation>
|
<translation>+</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="133"/>
|
<location filename="../src/window_deckeditor.cpp" line="137"/>
|
||||||
<source>&Decrement number</source>
|
<source>&Decrement number</source>
|
||||||
<translation>Anzahl v&erringern</translation>
|
<translation>Anzahl v&erringern</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="135"/>
|
<location filename="../src/window_deckeditor.cpp" line="139"/>
|
||||||
<source>-</source>
|
<source>-</source>
|
||||||
<translation>-</translation>
|
<translation>-</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="185"/>
|
<location filename="../src/window_deckeditor.cpp" line="186"/>
|
||||||
<source>Are you sure?</source>
|
<source>Are you sure?</source>
|
||||||
<translation>Bist du sicher?</translation>
|
<translation>Bist du sicher?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="186"/>
|
<location filename="../src/window_deckeditor.cpp" line="187"/>
|
||||||
<source>The decklist has been modified.
|
<source>The decklist has been modified.
|
||||||
Do you want to save the changes?</source>
|
Do you want to save the changes?</source>
|
||||||
<translation>Die Deckliste wurde verändert.
|
<translation>Die Deckliste wurde verändert.
|
||||||
|
|
|
@ -1498,127 +1498,127 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="56"/>
|
<location filename="../src/window_deckeditor.cpp" line="60"/>
|
||||||
<source>Deck &name:</source>
|
<source>Deck &name:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="60"/>
|
<location filename="../src/window_deckeditor.cpp" line="64"/>
|
||||||
<source>&Comments:</source>
|
<source>&Comments:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="84"/>
|
<location filename="../src/window_deckeditor.cpp" line="88"/>
|
||||||
<source>Deck editor [*]</source>
|
<source>Deck editor [*]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="86"/>
|
<location filename="../src/window_deckeditor.cpp" line="90"/>
|
||||||
<source>&New deck</source>
|
<source>&New deck</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="89"/>
|
<location filename="../src/window_deckeditor.cpp" line="93"/>
|
||||||
<source>&Load deck...</source>
|
<source>&Load deck...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="92"/>
|
<location filename="../src/window_deckeditor.cpp" line="96"/>
|
||||||
<source>&Save deck</source>
|
<source>&Save deck</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="95"/>
|
<location filename="../src/window_deckeditor.cpp" line="99"/>
|
||||||
<source>Save deck &as...</source>
|
<source>Save deck &as...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="98"/>
|
<location filename="../src/window_deckeditor.cpp" line="102"/>
|
||||||
<source>&Print deck...</source>
|
<source>&Print deck...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="101"/>
|
<location filename="../src/window_deckeditor.cpp" line="105"/>
|
||||||
<source>&Close</source>
|
<source>&Close</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="102"/>
|
<location filename="../src/window_deckeditor.cpp" line="106"/>
|
||||||
<source>Ctrl+Q</source>
|
<source>Ctrl+Q</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="105"/>
|
<location filename="../src/window_deckeditor.cpp" line="109"/>
|
||||||
<source>&Edit sets...</source>
|
<source>&Edit sets...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="108"/>
|
<location filename="../src/window_deckeditor.cpp" line="112"/>
|
||||||
<source>&Deck</source>
|
<source>&Deck</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="118"/>
|
<location filename="../src/window_deckeditor.cpp" line="122"/>
|
||||||
<source>&Sets</source>
|
<source>&Sets</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="121"/>
|
<location filename="../src/window_deckeditor.cpp" line="125"/>
|
||||||
<source>Add card to &maindeck</source>
|
<source>Add card to &maindeck</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="123"/>
|
<location filename="../src/window_deckeditor.cpp" line="127"/>
|
||||||
<source>Ctrl+M</source>
|
<source>Ctrl+M</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="124"/>
|
<location filename="../src/window_deckeditor.cpp" line="128"/>
|
||||||
<source>Add card to &sideboard</source>
|
<source>Add card to &sideboard</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="126"/>
|
<location filename="../src/window_deckeditor.cpp" line="130"/>
|
||||||
<source>Ctrl+N</source>
|
<source>Ctrl+N</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="127"/>
|
<location filename="../src/window_deckeditor.cpp" line="131"/>
|
||||||
<source>&Remove row</source>
|
<source>&Remove row</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="129"/>
|
<location filename="../src/window_deckeditor.cpp" line="133"/>
|
||||||
<source>Del</source>
|
<source>Del</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="130"/>
|
<location filename="../src/window_deckeditor.cpp" line="134"/>
|
||||||
<source>&Increment number</source>
|
<source>&Increment number</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="132"/>
|
<location filename="../src/window_deckeditor.cpp" line="136"/>
|
||||||
<source>+</source>
|
<source>+</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="133"/>
|
<location filename="../src/window_deckeditor.cpp" line="137"/>
|
||||||
<source>&Decrement number</source>
|
<source>&Decrement number</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="135"/>
|
<location filename="../src/window_deckeditor.cpp" line="139"/>
|
||||||
<source>-</source>
|
<source>-</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="185"/>
|
<location filename="../src/window_deckeditor.cpp" line="186"/>
|
||||||
<source>Are you sure?</source>
|
<source>Are you sure?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/window_deckeditor.cpp" line="186"/>
|
<location filename="../src/window_deckeditor.cpp" line="187"/>
|
||||||
<source>The decklist has been modified.
|
<source>The decklist has been modified.
|
||||||
Do you want to save the changes?</source>
|
Do you want to save the changes?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
|
|
@ -4,7 +4,7 @@ DEPENDPATH += . src
|
||||||
INCLUDEPATH += . src ../cockatrice/src
|
INCLUDEPATH += . src ../cockatrice/src
|
||||||
MOC_DIR = build
|
MOC_DIR = build
|
||||||
OBJECTS_DIR = build
|
OBJECTS_DIR = build
|
||||||
QT += network svg
|
QT += network svg xml
|
||||||
|
|
||||||
HEADERS += src/oracleimporter.h ../cockatrice/src/carddatabase.h
|
HEADERS += src/oracleimporter.h src/window_main.h ../cockatrice/src/carddatabase.h
|
||||||
SOURCES += src/main.cpp src/oracleimporter.cpp ../cockatrice/src/carddatabase.cpp
|
SOURCES += src/main.cpp src/oracleimporter.cpp src/window_main.cpp ../cockatrice/src/carddatabase.cpp
|
||||||
|
|
547
oracle/sets.xml
547
oracle/sets.xml
|
@ -1,354 +1,293 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<cockatrice_setdatabase version="20090811">
|
<cockatrice_setdatabase version="20090811">
|
||||||
<picture_url>http://www.wizards.com/global/images/magic/general/%1.jpg</picture_url>
|
<picture_url>http://www.wizards.com/global/images/magic/general/%1.jpg</picture_url>
|
||||||
|
<set_url>http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=text&set=["!longname!"]</set_url>
|
||||||
<set>
|
<set>
|
||||||
<name>5E</name>
|
<name>ARB</name>
|
||||||
<longname>Fifth Edition</longname>
|
<longname>Alara Reborn</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-5th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>ST2K</name>
|
|
||||||
<longname>Starter 2000</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-st2.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>US</name>
|
|
||||||
<longname>Urza's Saga</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-us.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>MR</name>
|
|
||||||
<longname>Mirrodin</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-mr.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>NE</name>
|
|
||||||
<longname>Nemesis</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ne.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>VI</name>
|
|
||||||
<longname>Visions</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-vi.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>FD</name>
|
|
||||||
<longname>Fifth Dawn</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-fd.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>FE</name>
|
|
||||||
<longname>Fallen Empires</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-fe.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>EX</name>
|
|
||||||
<longname>Exodus</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ex.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>6E</name>
|
|
||||||
<longname>Sixth Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-6th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>PLC</name>
|
|
||||||
<longname>Planar Chaos</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-pc.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>10E</name>
|
|
||||||
<longname>Tenth Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-10.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>CFX</name>
|
|
||||||
<longname>Conflux</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-cf.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>P2</name>
|
|
||||||
<longname>Portal: Second Age</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-pt2.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>P3</name>
|
|
||||||
<longname>Portal: Three Kingdoms</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-pt3.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>OD</name>
|
|
||||||
<longname>Odyssey</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-od.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>UNH</name>
|
|
||||||
<longname>Unhinged</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-uh.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>BOK</name>
|
|
||||||
<longname>Betrayers of Kamigawa</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-bk.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>LRW</name>
|
|
||||||
<longname>Lorwyn</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-lo.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>WL</name>
|
|
||||||
<longname>Weatherlight</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-wl.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>ON</name>
|
|
||||||
<longname>Onslaught</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-on.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>7E</name>
|
|
||||||
<longname>Seventh Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-7th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>GP</name>
|
|
||||||
<longname>Guildpact</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-gp.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>CHK</name>
|
|
||||||
<longname>Champions of Kamigawa</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ck.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>8E</name>
|
|
||||||
<longname>Eighth Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-8th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>HL</name>
|
|
||||||
<longname>Homelands</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-hl.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>PR</name>
|
|
||||||
<longname>Promo cards</longname>
|
|
||||||
<url>promo.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>PS</name>
|
|
||||||
<longname>Planeshift</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ps.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>PT</name>
|
|
||||||
<longname>Portal</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-pt.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>IA</name>
|
|
||||||
<longname>Ice Age</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ia.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>SOK</name>
|
|
||||||
<longname>Saviors of Kamigawa</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-sk.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>DIS</name>
|
|
||||||
<longname>Dissension</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-di.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>PY</name>
|
|
||||||
<longname>Prophecy</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-py.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>9E</name>
|
|
||||||
<longname>Ninth Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-9th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>B</name>
|
|
||||||
<longname>Limited Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-lu.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>IN</name>
|
|
||||||
<longname>Invasion</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-in.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>AL</name>
|
<name>AL</name>
|
||||||
<longname>Alliances</longname>
|
<longname>Alliances</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-al.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>AN</name>
|
|
||||||
<longname>Arabian Nights</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-an.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>ARB</name>
|
|
||||||
<longname>Alara Reborn</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ar.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>AP</name>
|
|
||||||
<longname>Apocalypse</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ap.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>AQ</name>
|
<name>AQ</name>
|
||||||
<longname>Antiquities</longname>
|
<longname>Antiquities</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-aq.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>SHM</name>
|
<name>AP</name>
|
||||||
<longname>Shadowmoor</longname>
|
<longname>Apocalypse</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-sm.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>R</name>
|
<name>AN</name>
|
||||||
<longname>Revised Edition</longname>
|
<longname>Arabian Nights</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-rv.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>U</name>
|
<name>BOK</name>
|
||||||
<longname>Unlimited Edition</longname>
|
<longname>Betrayers of Kamigawa</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-lu.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>SC</name>
|
<name>CHK</name>
|
||||||
<longname>Scourge</longname>
|
<longname>Champions of Kamigawa</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-sc.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>SH</name>
|
|
||||||
<longname>Stronghold</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-sh.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>JU</name>
|
|
||||||
<longname>Judgment</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ju.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>CH</name>
|
<name>CH</name>
|
||||||
<longname>Chronicles</longname>
|
<longname>Chronicles</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ch.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>MOR</name>
|
<name>6E</name>
|
||||||
<longname>Morningtide</longname>
|
<longname>Classic Sixth Edition</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-mt.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>ST</name>
|
|
||||||
<longname>Starter</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-st.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>TE</name>
|
|
||||||
<longname>Tempest</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-te.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>ALA</name>
|
|
||||||
<longname>Shards of Alara</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-sa.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>LE</name>
|
|
||||||
<longname>Legions</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-le.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>FUT</name>
|
|
||||||
<longname>Future Sight</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-fs.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>CS</name>
|
<name>CS</name>
|
||||||
<longname>Coldsnap</longname>
|
<longname>Coldsnap</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-cs.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>LG</name>
|
<name>CFX</name>
|
||||||
<longname>Legends</longname>
|
<longname>Conflux</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-lg.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>M10</name>
|
|
||||||
<longname>Magic 2010</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-m10.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>RAV</name>
|
|
||||||
<longname>Ravnica</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ra.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>TO</name>
|
|
||||||
<longname>Torment</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-to.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>EVE</name>
|
|
||||||
<longname>Eventide</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-et.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>DK</name>
|
|
||||||
<longname>The Dark</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-dk.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>4E</name>
|
|
||||||
<longname>Fourth Edition</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-4th.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>UD</name>
|
|
||||||
<longname>Urza's Destiny</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ud.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>TSP</name>
|
|
||||||
<longname>Time Spiral</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ts.txt</url>
|
|
||||||
</set>
|
|
||||||
<set>
|
|
||||||
<name>UG</name>
|
|
||||||
<longname>Unglued</longname>
|
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ug.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>DS</name>
|
<name>DS</name>
|
||||||
<longname>Darksteel</longname>
|
<longname>Darksteel</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ds.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>UL</name>
|
<name>DIS</name>
|
||||||
<longname>Urza's Legacy</longname>
|
<longname>Dissension</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ul.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>MI</name>
|
<name>8E</name>
|
||||||
<longname>Mirage</longname>
|
<longname>Eighth Edition</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-mi.txt</url>
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>EVE</name>
|
||||||
|
<longname>Eventide</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>EX</name>
|
||||||
|
<longname>Exodus</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>FE</name>
|
||||||
|
<longname>Fallen Empires</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>FD</name>
|
||||||
|
<longname>Fifth Dawn</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>5E</name>
|
||||||
|
<longname>Fifth Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>4E</name>
|
||||||
|
<longname>Fourth Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>FUT</name>
|
||||||
|
<longname>Future Sight</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>GP</name>
|
||||||
|
<longname>Guildpact</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>HL</name>
|
||||||
|
<longname>Homelands</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>IA</name>
|
||||||
|
<longname>Ice Age</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>IN</name>
|
||||||
|
<longname>Invasion</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>JU</name>
|
||||||
|
<longname>Judgment</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>LG</name>
|
||||||
|
<longname>Legends</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>LE</name>
|
||||||
|
<longname>Legions</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>A</name>
|
||||||
|
<longname>Limited Edition Alpha</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>B</name>
|
||||||
|
<longname>Limited Edition Beta</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>LRW</name>
|
||||||
|
<longname>Lorwyn</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>M10</name>
|
||||||
|
<longname>Magic 2010</longname>
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>MM</name>
|
<name>MM</name>
|
||||||
<longname>Mercadian Masques</longname>
|
<longname>Mercadian Masques</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-mm.txt</url>
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>MI</name>
|
||||||
|
<longname>Mirage</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>MR</name>
|
||||||
|
<longname>Mirrodin</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>MOR</name>
|
||||||
|
<longname>Morningtide</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>NE</name>
|
||||||
|
<longname>Nemesis</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>9E</name>
|
||||||
|
<longname>Ninth Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>OD</name>
|
||||||
|
<longname>Odyssey</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>ON</name>
|
||||||
|
<longname>Onslaught</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>PLC</name>
|
||||||
|
<longname>Planar Chaos</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>PS</name>
|
||||||
|
<longname>Planeshift</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>PT</name>
|
||||||
|
<longname>Portal</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>P2</name>
|
||||||
|
<longname>Portal Second Age</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>P3</name>
|
||||||
|
<longname>Portal Three Kingdoms</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>PR</name>
|
||||||
|
<longname>Promo set for Gatherer</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>PY</name>
|
||||||
|
<longname>Prophecy</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>RAV</name>
|
||||||
|
<longname>Ravnica: City of Guilds</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>R</name>
|
||||||
|
<longname>Revised Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>SOK</name>
|
||||||
|
<longname>Saviors of Kamigawa</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>SC</name>
|
||||||
|
<longname>Scourge</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>7E</name>
|
||||||
|
<longname>Seventh Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>SHM</name>
|
||||||
|
<longname>Shadowmoor</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>ALA</name>
|
||||||
|
<longname>Shards of Alara</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>ST</name>
|
||||||
|
<longname>Starter 1999</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>ST2K</name>
|
||||||
|
<longname>Starter 2000</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>SH</name>
|
||||||
|
<longname>Stronghold</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>TE</name>
|
||||||
|
<longname>Tempest</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>10E</name>
|
||||||
|
<longname>Tenth Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>DK</name>
|
||||||
|
<longname>The Dark</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>TSP</name>
|
||||||
|
<longname>Time Spiral</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>TSB</name>
|
||||||
|
<longname>Time Spiral "Timeshifted"</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>TO</name>
|
||||||
|
<longname>Torment</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>UG</name>
|
||||||
|
<longname>Unglued</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>UNH</name>
|
||||||
|
<longname>Unhinged</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>U</name>
|
||||||
|
<longname>Unlimited Edition</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>UD</name>
|
||||||
|
<longname>Urza's Destiny</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>UL</name>
|
||||||
|
<longname>Urza's Legacy</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>US</name>
|
||||||
|
<longname>Urza's Saga</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>VI</name>
|
||||||
|
<longname>Visions</longname>
|
||||||
|
</set>
|
||||||
|
<set>
|
||||||
|
<name>WL</name>
|
||||||
|
<longname>Weatherlight</longname>
|
||||||
</set>
|
</set>
|
||||||
<set>
|
<set>
|
||||||
<name>ZEN</name>
|
<name>ZEN</name>
|
||||||
<longname>Zendikar</longname>
|
<longname>Zendikar</longname>
|
||||||
<url>http://www.crystalkeep.com/magic/rules/oracle/oracle-ze.txt</url>
|
|
||||||
</set>
|
</set>
|
||||||
</cockatrice_setdatabase>
|
</cockatrice_setdatabase>
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
#include "oracleimporter.h"
|
#include "oracleimporter.h"
|
||||||
|
#include "window_main.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
OracleImporter importer("../oracle");
|
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||||
importer.downloadNextFile();
|
|
||||||
|
WindowMain wnd;
|
||||||
|
wnd.show();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtNetwork>
|
#include <QtNetwork>
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
|
#include <QDomDocument>
|
||||||
|
|
||||||
OracleImporter::OracleImporter(const QString &_dataDir)
|
OracleImporter::OracleImporter(const QString &_dataDir, QObject *parent)
|
||||||
: dataDir(_dataDir), setIndex(-1)
|
: CardDatabase(parent), dataDir(_dataDir), setIndex(-1)
|
||||||
{
|
{
|
||||||
QFile setsFile(dataDir + "/sets.xml");
|
QFile setsFile(dataDir + "/sets.xml");
|
||||||
setsFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
setsFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||||
|
@ -24,101 +25,142 @@ OracleImporter::OracleImporter(const QString &_dataDir)
|
||||||
edition = xml.readElementText();
|
edition = xml.readElementText();
|
||||||
else if (xml.name() == "longname")
|
else if (xml.name() == "longname")
|
||||||
editionLong = xml.readElementText();
|
editionLong = xml.readElementText();
|
||||||
else if(xml.name() == "url")
|
else if (xml.name() == "url")
|
||||||
editionURL = xml.readElementText();
|
editionURL = xml.readElementText();
|
||||||
}
|
}
|
||||||
setsToDownload << SetToDownload(edition, editionLong, editionURL);
|
setsToDownload << SetToDownload(edition, editionLong, editionURL);
|
||||||
|
edition = editionLong = editionURL = QString();
|
||||||
} else if (xml.name() == "picture_url")
|
} else if (xml.name() == "picture_url")
|
||||||
pictureUrl = xml.readElementText();
|
pictureUrl = xml.readElementText();
|
||||||
|
else if (xml.name() == "set_url")
|
||||||
|
setUrl = xml.readElementText();
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = new QBuffer(this);
|
buffer = new QBuffer(this);
|
||||||
http = new QHttp(this);
|
http = new QHttp(this);
|
||||||
connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpRequestFinished(int, bool)));
|
connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpRequestFinished(int, bool)));
|
||||||
connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
|
connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
|
||||||
|
connect(http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OracleImporter::importOracleFile(CardSet *set)
|
CardInfo *OracleImporter::addCard(QString cardName, const QString &cardCost, const QString &cardType, const QString &cardPT, const QStringList &cardText)
|
||||||
|
{
|
||||||
|
QString fullCardText = cardText.join("\n");
|
||||||
|
bool splitCard = false;
|
||||||
|
if (cardName.contains('(')) {
|
||||||
|
cardName.remove(QRegExp(" \\(.*\\)"));
|
||||||
|
splitCard = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CardInfo *card;
|
||||||
|
if (cardHash.contains(cardName)) {
|
||||||
|
card = cardHash.value(cardName);
|
||||||
|
if (splitCard && !card->getText().contains(fullCardText))
|
||||||
|
card->setText(card->getText() + "\n---\n" + fullCardText);
|
||||||
|
} else {
|
||||||
|
// Workaround for card name weirdness
|
||||||
|
if (cardName.contains("XX"))
|
||||||
|
cardName.remove("XX");
|
||||||
|
|
||||||
|
bool mArtifact = false;
|
||||||
|
if (cardType.endsWith("Artifact"))
|
||||||
|
for (int i = 0; i < cardText.size(); ++i)
|
||||||
|
if (cardText[i].contains("{T}") && cardText[i].contains("to your mana pool"))
|
||||||
|
mArtifact = true;
|
||||||
|
|
||||||
|
QStringList colors;
|
||||||
|
QStringList allColors = QStringList() << "W" << "U" << "B" << "R" << "G";
|
||||||
|
for (int i = 0; i < allColors.size(); i++)
|
||||||
|
if (cardCost.contains(allColors[i]))
|
||||||
|
colors << allColors[i];
|
||||||
|
|
||||||
|
if (cardText.contains(cardName + " is white."))
|
||||||
|
colors << "W";
|
||||||
|
if (cardText.contains(cardName + " is blue."))
|
||||||
|
colors << "U";
|
||||||
|
if (cardText.contains(cardName + " is black."))
|
||||||
|
colors << "B";
|
||||||
|
if (cardText.contains(cardName + " is red."))
|
||||||
|
colors << "R";
|
||||||
|
if (cardText.contains(cardName + " is green."))
|
||||||
|
colors << "G";
|
||||||
|
|
||||||
|
card = new CardInfo(this, cardName, cardCost, cardType, cardPT, fullCardText, colors);
|
||||||
|
card->setPicURL(getURLFromName(normalizeName(cardName)));
|
||||||
|
int tableRow = 1;
|
||||||
|
QString mainCardType = card->getMainCardType();
|
||||||
|
if ((mainCardType == "Land") || mArtifact)
|
||||||
|
tableRow = 0;
|
||||||
|
else if ((mainCardType == "Sorcery") || (mainCardType == "Instant"))
|
||||||
|
tableRow = 2;
|
||||||
|
else if (mainCardType == "Creature")
|
||||||
|
tableRow = 3;
|
||||||
|
card->setTableRow(tableRow);
|
||||||
|
|
||||||
|
cardHash.insert(cardName, card);
|
||||||
|
}
|
||||||
|
return card;
|
||||||
|
}
|
||||||
|
|
||||||
|
int OracleImporter::importTextSpoiler(CardSet *set, const QByteArray &data)
|
||||||
{
|
{
|
||||||
int cards = 0;
|
int cards = 0;
|
||||||
buffer->seek(0);
|
QString bufferContents(data);
|
||||||
QTextStream in(buffer);
|
|
||||||
while (!in.atEnd()) {
|
// Workaround for ampersand bug in text spoilers
|
||||||
QString cardname = in.readLine();
|
int index = -1;
|
||||||
if (cardname.isEmpty())
|
while ((index = bufferContents.indexOf('&', index + 1)) != -1) {
|
||||||
continue;
|
int semicolonIndex = bufferContents.indexOf(';', index);
|
||||||
if (cardname.contains("XX")){
|
if (semicolonIndex > 5) {
|
||||||
cardname.remove("XX");
|
bufferContents.insert(index + 1, "amp;");
|
||||||
|
index += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString manacost = in.readLine();
|
|
||||||
QString cardtype, powtough;
|
|
||||||
QStringList text;
|
|
||||||
if ((manacost.contains("Land")) || (manacost.contains("Sorcery")) || (manacost.contains("Instant")) || (manacost.contains("Artifact"))) {
|
|
||||||
cardtype = manacost;
|
|
||||||
manacost.clear();
|
|
||||||
} else {
|
|
||||||
cardtype = in.readLine();
|
|
||||||
powtough = in.readLine();
|
|
||||||
// Dirty hack.
|
|
||||||
// Cards to test: Any creature, any basic land, Ancestral Vision, Fire // Ice.
|
|
||||||
if (!powtough.contains("/") || powtough.size() > 5) {
|
|
||||||
text << powtough;
|
|
||||||
powtough = QString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QString line = in.readLine();
|
|
||||||
QString firstTextLine = line;
|
|
||||||
bool manaArtifact = false;
|
|
||||||
while (!line.isEmpty()) {
|
|
||||||
text << line;
|
|
||||||
line = in.readLine();
|
|
||||||
}
|
|
||||||
// Table row override
|
|
||||||
if (cardtype.endsWith("Artifact"))
|
|
||||||
for (int i = 0; i < text.size(); ++i)
|
|
||||||
if (text[i].contains("{T}") && text[i].contains("to your mana pool"))
|
|
||||||
manaArtifact = true;
|
|
||||||
CardInfo *card;
|
|
||||||
if (cardHash.contains(cardname))
|
|
||||||
card = cardHash.value(cardname);
|
|
||||||
else {
|
|
||||||
QStringList colors;
|
|
||||||
QStringList allColors = QStringList() << "W" << "U" << "B" << "R" << "G";
|
|
||||||
for (int i = 0; i < allColors.size(); i++)
|
|
||||||
if (manacost.contains(allColors[i]))
|
|
||||||
colors << allColors[i];
|
|
||||||
|
|
||||||
QString wholeText = text.join(";");
|
|
||||||
if (text.contains(cardname + " is white."))
|
|
||||||
colors << "W";
|
|
||||||
if (text.contains(cardname + " is blue."))
|
|
||||||
colors << "U";
|
|
||||||
if (text.contains(cardname + " is black."))
|
|
||||||
colors << "B";
|
|
||||||
if (text.contains(cardname + " is red."))
|
|
||||||
colors << "R";
|
|
||||||
if (text.contains(cardname + " is green."))
|
|
||||||
colors << "G";
|
|
||||||
|
|
||||||
card = new CardInfo(this, cardname, manacost, cardtype, powtough, text.join("\n"), colors);
|
|
||||||
card->setPicURL(getURLFromName(normalizeName(cardname)));
|
|
||||||
int tableRow = 1;
|
|
||||||
QString mainCardType = card->getMainCardType();
|
|
||||||
if ((mainCardType == "Land") || manaArtifact)
|
|
||||||
tableRow = 0;
|
|
||||||
else if ((mainCardType == "Sorcery") || (mainCardType == "Instant"))
|
|
||||||
tableRow = 2;
|
|
||||||
else if (mainCardType == "Creature")
|
|
||||||
tableRow = 3;
|
|
||||||
card->setTableRow(tableRow);
|
|
||||||
|
|
||||||
cardHash.insert(cardname, card);
|
|
||||||
}
|
|
||||||
card->addToSet(set);
|
|
||||||
cards++;
|
|
||||||
}
|
}
|
||||||
qDebug(QString("%1: %2 cards imported").arg(set->getLongName()).arg(cards).toLatin1());
|
|
||||||
|
QDomDocument doc;
|
||||||
|
QString errorMsg;
|
||||||
|
int errorLine, errorColumn;
|
||||||
|
if (!doc.setContent(bufferContents, &errorMsg, &errorLine, &errorColumn))
|
||||||
|
qDebug(QString("error: %1, line=%2, column=%3").arg(errorMsg).arg(errorLine).arg(errorColumn).toLatin1());
|
||||||
|
|
||||||
|
QDomNodeList divs = doc.elementsByTagName("div");
|
||||||
|
for (int i = 0; i < divs.size(); ++i) {
|
||||||
|
QDomElement div = divs.at(i).toElement();
|
||||||
|
QDomNode divClass = div.attributes().namedItem("class");
|
||||||
|
if (divClass.nodeValue() == "textspoiler") {
|
||||||
|
QString cardName, cardCost, cardType, cardPT, cardText;
|
||||||
|
|
||||||
|
QDomNodeList trs = div.elementsByTagName("tr");
|
||||||
|
for (int j = 0; j < trs.size(); ++j) {
|
||||||
|
QDomElement tr = trs.at(j).toElement();
|
||||||
|
QDomNodeList tds = tr.elementsByTagName("td");
|
||||||
|
if (tds.size() != 2) {
|
||||||
|
CardInfo *card = addCard(cardName, cardCost, cardType, cardPT, cardText.split("\n"));
|
||||||
|
if (!set->contains(card)) {
|
||||||
|
card->addToSet(set);
|
||||||
|
cards++;
|
||||||
|
}
|
||||||
|
cardName = cardCost = cardType = cardPT = cardText = QString();
|
||||||
|
} else {
|
||||||
|
QString v1 = tds.at(0).toElement().text().simplified();
|
||||||
|
QString v2 = tds.at(1).toElement().text().replace(trUtf8("—"), "-");
|
||||||
|
|
||||||
|
if (v1 == "Name:")
|
||||||
|
cardName = v2.simplified();
|
||||||
|
else if (v1 == "Cost:")
|
||||||
|
cardCost = v2.simplified();
|
||||||
|
else if (v1 == "Type:")
|
||||||
|
cardType = v2.simplified();
|
||||||
|
else if (v1 == "Pow/Tgh:")
|
||||||
|
cardPT = v2.simplified();
|
||||||
|
else if (v1 == "Rules Text:")
|
||||||
|
cardText = v2.trimmed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OracleImporter::normalizeName(QString cardname)
|
QString OracleImporter::normalizeName(QString cardname)
|
||||||
|
@ -146,18 +188,22 @@ QString OracleImporter::getURLFromName(QString normalizedName)
|
||||||
void OracleImporter::downloadNextFile()
|
void OracleImporter::downloadNextFile()
|
||||||
{
|
{
|
||||||
if (setIndex == -1) {
|
if (setIndex == -1) {
|
||||||
progressDialog = new QProgressDialog(tr("Downloading oracle files..."), QString(), 0, setsToDownload.size());
|
|
||||||
setIndex = 0;
|
setIndex = 0;
|
||||||
|
emit setIndexChanged(0, 0, setsToDownload[0].getLongName());
|
||||||
}
|
}
|
||||||
QString urlString = setsToDownload[setIndex].getUrl();
|
QString urlString = setsToDownload[setIndex].getUrl();
|
||||||
|
if (urlString.isEmpty())
|
||||||
|
urlString = setUrl;
|
||||||
|
urlString = urlString.replace("!longname!", setsToDownload[setIndex].getLongName());
|
||||||
if (urlString.startsWith("http://")) {
|
if (urlString.startsWith("http://")) {
|
||||||
QUrl url(urlString);
|
QUrl url(urlString);
|
||||||
http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
|
http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
|
||||||
|
QString path = QUrl::toPercentEncoding(urlString.mid(url.host().size() + 7).replace(' ', '+'), "?!$&'()*+,;=:@/");
|
||||||
|
|
||||||
buffer->close();
|
buffer->close();
|
||||||
buffer->setData(QByteArray());
|
buffer->setData(QByteArray());
|
||||||
buffer->open(QIODevice::ReadWrite | QIODevice::Text);
|
buffer->open(QIODevice::ReadWrite | QIODevice::Text);
|
||||||
reqId = http->get(QUrl::toPercentEncoding(url.path(), "!$&'()*+,;=:@/"), buffer);
|
reqId = http->get(path, buffer);
|
||||||
} else {
|
} else {
|
||||||
QFile file(dataDir + "/" + urlString);
|
QFile file(dataDir + "/" + urlString);
|
||||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||||
|
@ -182,16 +228,20 @@ void OracleImporter::httpRequestFinished(int requestId, bool error)
|
||||||
CardSet *set = new CardSet(setsToDownload[setIndex].getShortName(), setsToDownload[setIndex].getLongName());
|
CardSet *set = new CardSet(setsToDownload[setIndex].getShortName(), setsToDownload[setIndex].getLongName());
|
||||||
if (!setHash.contains(set->getShortName()))
|
if (!setHash.contains(set->getShortName()))
|
||||||
setHash.insert(set->getShortName(), set);
|
setHash.insert(set->getShortName(), set);
|
||||||
importOracleFile(set);
|
|
||||||
progressDialog->setValue(++setIndex);
|
buffer->seek(0);
|
||||||
|
buffer->close();
|
||||||
|
int cards = importTextSpoiler(set, buffer->data());
|
||||||
|
++setIndex;
|
||||||
|
|
||||||
if (setIndex == setsToDownload.size()) {
|
if (setIndex == setsToDownload.size()) {
|
||||||
setIndex = -1;
|
setIndex = -1;
|
||||||
saveToFile(dataDir + "/cards.xml");
|
saveToFile(dataDir + "/cards.xml");
|
||||||
QMessageBox::information(0, tr("Import finished"), tr("Total: %1 cards imported").arg(cardHash.size()));
|
emit setIndexChanged(cards, setIndex, QString());
|
||||||
qApp->quit();
|
} else {
|
||||||
} else
|
|
||||||
downloadNextFile();
|
downloadNextFile();
|
||||||
|
emit setIndexChanged(cards, setIndex, setsToDownload[setIndex].getLongName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OracleImporter::readResponseHeader(const QHttpResponseHeader &responseHeader)
|
void OracleImporter::readResponseHeader(const QHttpResponseHeader &responseHeader)
|
||||||
|
@ -205,7 +255,6 @@ void OracleImporter::readResponseHeader(const QHttpResponseHeader &responseHeade
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
QMessageBox::information(0, tr("HTTP"), tr("Download failed: %1.").arg(responseHeader.reasonPhrase()));
|
QMessageBox::information(0, tr("HTTP"), tr("Download failed: %1.").arg(responseHeader.reasonPhrase()));
|
||||||
progressDialog->hide();
|
|
||||||
http->abort();
|
http->abort();
|
||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <carddatabase.h>
|
#include <carddatabase.h>
|
||||||
#include <QHttp>
|
#include <QHttp>
|
||||||
|
|
||||||
class QProgressDialog;
|
|
||||||
class QBuffer;
|
class QBuffer;
|
||||||
|
|
||||||
class SetToDownload {
|
class SetToDownload {
|
||||||
|
@ -22,22 +21,27 @@ class OracleImporter : public CardDatabase {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QList<SetToDownload> setsToDownload;
|
QList<SetToDownload> setsToDownload;
|
||||||
QString pictureUrl;
|
QString pictureUrl, setUrl;
|
||||||
QString dataDir;
|
QString dataDir;
|
||||||
int setIndex;
|
int setIndex;
|
||||||
int reqId;
|
int reqId;
|
||||||
QBuffer *buffer;
|
QBuffer *buffer;
|
||||||
QHttp *http;
|
QHttp *http;
|
||||||
QProgressDialog *progressDialog;
|
|
||||||
QString normalizeName(QString);
|
QString normalizeName(QString);
|
||||||
QString getURLFromName(QString);
|
QString getURLFromName(QString);
|
||||||
|
|
||||||
|
CardInfo *addCard(QString cardName, const QString &cardCost, const QString &cardType, const QString &cardPT, const QStringList &cardText);
|
||||||
private slots:
|
private slots:
|
||||||
void httpRequestFinished(int requestId, bool error);
|
void httpRequestFinished(int requestId, bool error);
|
||||||
void readResponseHeader(const QHttpResponseHeader &responseHeader);
|
void readResponseHeader(const QHttpResponseHeader &responseHeader);
|
||||||
|
signals:
|
||||||
|
void setIndexChanged(int cardsImported, int setIndex, const QString &nextSetName);
|
||||||
|
void dataReadProgress(int bytesRead, int totalBytes);
|
||||||
public:
|
public:
|
||||||
OracleImporter(const QString &_dataDir);
|
OracleImporter(const QString &_dataDir, QObject *parent = 0);
|
||||||
void importOracleFile(CardSet *set);
|
int importTextSpoiler(CardSet *set, const QByteArray &data);
|
||||||
void downloadNextFile();
|
void downloadNextFile();
|
||||||
|
int getSetsCount() const { return setsToDownload.size(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
60
oracle/src/window_main.cpp
Normal file
60
oracle/src/window_main.cpp
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#include <QtGui>
|
||||||
|
#include "window_main.h"
|
||||||
|
#include "oracleimporter.h"
|
||||||
|
|
||||||
|
WindowMain::WindowMain(QWidget *parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
{
|
||||||
|
importer = new OracleImporter("../oracle", this);
|
||||||
|
|
||||||
|
totalLabel = new QLabel(tr("Total progress:"));
|
||||||
|
totalProgressBar = new QProgressBar;
|
||||||
|
nextSetLabel1 = new QLabel(tr("Current file:"));
|
||||||
|
nextSetLabel2 = new QLabel;
|
||||||
|
fileLabel = new QLabel(tr("Progress:"));
|
||||||
|
fileProgressBar = new QProgressBar;
|
||||||
|
|
||||||
|
messageLog = new QTextEdit;
|
||||||
|
messageLog->setReadOnly(true);
|
||||||
|
|
||||||
|
QGridLayout *grid = new QGridLayout;
|
||||||
|
grid->addWidget(totalLabel, 0, 0);
|
||||||
|
grid->addWidget(totalProgressBar, 0, 1);
|
||||||
|
grid->addWidget(nextSetLabel1, 1, 0);
|
||||||
|
grid->addWidget(nextSetLabel2, 1, 1);
|
||||||
|
grid->addWidget(fileLabel, 2, 0);
|
||||||
|
grid->addWidget(fileProgressBar, 2, 1);
|
||||||
|
grid->addWidget(messageLog, 3, 0, 1, 2);
|
||||||
|
|
||||||
|
QWidget *centralWidget = new QWidget;
|
||||||
|
centralWidget->setLayout(grid);
|
||||||
|
setCentralWidget(centralWidget);
|
||||||
|
|
||||||
|
connect(importer, SIGNAL(setIndexChanged(int, int, const QString &)), this, SLOT(updateTotalProgress(int, int, const QString &)));
|
||||||
|
connect(importer, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateFileProgress(int, int)));
|
||||||
|
totalProgressBar->setMaximum(importer->getSetsCount());
|
||||||
|
|
||||||
|
setWindowTitle(tr("Oracle importer"));
|
||||||
|
setFixedSize(300, 300);
|
||||||
|
|
||||||
|
importer->downloadNextFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowMain::updateTotalProgress(int cardsImported, int setIndex, const QString &nextSetName)
|
||||||
|
{
|
||||||
|
if (setIndex != 0)
|
||||||
|
messageLog->append(QString("%1: %2 cards imported").arg(nextSetLabel2->text()).arg(cardsImported));
|
||||||
|
totalProgressBar->setValue(setIndex);
|
||||||
|
if (nextSetName.isEmpty()) {
|
||||||
|
QMessageBox::information(this, tr("Oracle importer"), tr("Import finished: %1 cards.").arg(importer->getCardList().size()));
|
||||||
|
qApp->quit();
|
||||||
|
} else {
|
||||||
|
nextSetLabel2->setText(nextSetName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowMain::updateFileProgress(int bytesRead, int totalBytes)
|
||||||
|
{
|
||||||
|
fileProgressBar->setMaximum(totalBytes);
|
||||||
|
fileProgressBar->setValue(bytesRead);
|
||||||
|
}
|
26
oracle/src/window_main.h
Normal file
26
oracle/src/window_main.h
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#ifndef WINDOW_MAIN_H
|
||||||
|
#define WINDOW_MAIN_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
class OracleImporter;
|
||||||
|
class QLabel;
|
||||||
|
class QProgressBar;
|
||||||
|
class QTextEdit;
|
||||||
|
|
||||||
|
class WindowMain : public QMainWindow {
|
||||||
|
Q_OBJECT
|
||||||
|
private:
|
||||||
|
OracleImporter *importer;
|
||||||
|
|
||||||
|
QLabel *totalLabel, *fileLabel, *nextSetLabel1, *nextSetLabel2;
|
||||||
|
QProgressBar *totalProgressBar, *fileProgressBar;
|
||||||
|
QTextEdit *messageLog;
|
||||||
|
private slots:
|
||||||
|
void updateTotalProgress(int cardsImported, int setIndex, const QString &nextSetName);
|
||||||
|
void updateFileProgress(int bytesRead, int totalBytes);
|
||||||
|
public:
|
||||||
|
WindowMain(QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue