|
| 1 | +## MTGDPC |
| 2 | + |
| 3 | +Magic the Gathering Deck Price Checker (for JPN Players). |
| 4 | +Price check is done by crawling [Wisdom Guild](www.wisdom-guild.net) with BeautifulSoup. |
| 5 | + |
| 6 | +### Requirements |
| 7 | + |
| 8 | +- Python 3.6 (or above) |
| 9 | +- Beautiful Soup |
| 10 | +- lxml |
| 11 | + |
| 12 | +Simply, `pip install -r requirements.txt` to install above modules. |
| 13 | + |
| 14 | +### How to use |
| 15 | + |
| 16 | +#### 1. Prepare decklist |
| 17 | +`.txt` file of decklist must fit the following format: |
| 18 | +``` |
| 19 | +<# of cards> <card name> |
| 20 | +... |
| 21 | +
|
| 22 | +Sideboard |
| 23 | +<# of cards> <card name> |
| 24 | +... |
| 25 | +``` |
| 26 | +Note that card name must be in English. |
| 27 | +`decklist` directory contains some sample `.txt` files. |
| 28 | + |
| 29 | +#### 2. Execute `mtgdpc.py` with argument of prepared `.txt` file |
| 30 | +``` |
| 31 | +$ python mtgdpc.py <.txt file> |
| 32 | +------------------------------ MAIN DECK ------------------------------ |
| 33 | +
|
| 34 | +<price> x <# of cards> = <price of card(s)> <Card Name(JPN)/(EN)> |
| 35 | +... |
| 36 | +
|
| 37 | +main ) price: < (A) total price of main deck > |
| 38 | +
|
| 39 | +------------------------------ SIDEBOARD ------------------------------ |
| 40 | +
|
| 41 | +<price> x <# of cards> = <price of card(s)> <Card Name(JPN)/(EN)> |
| 42 | +... |
| 43 | +
|
| 44 | +side ) price: < (B) total price of sideboard > |
| 45 | +
|
| 46 | +total price (main + side): (A) + (B) |
| 47 | +``` |
| 48 | + |
| 49 | +### Sample Decklist & Output |
| 50 | + |
| 51 | +#### `decklist/gorgari_midrange.txt` |
| 52 | +``` |
| 53 | +7 Swamp |
| 54 | +5 Forest |
| 55 | +4 Overgrown Tomb |
| 56 | +4 Woodland Cemetery |
| 57 | +4 Llanowar Elves |
| 58 | +4 Pelt Collector |
| 59 | +4 Stitcher's Supplier |
| 60 | +4 Glowspore Shaman |
| 61 | +4 Merfolk Branchwalker |
| 62 | +2 Graveyard Marshal |
| 63 | +2 Kraul Harpooner |
| 64 | +4 Charnel Troll |
| 65 | +4 Midnight Reaper |
| 66 | +4 Plaguecrafter |
| 67 | +4 Gruesome Menagerie |
| 68 | +
|
| 69 | +Sideboard |
| 70 | +3 Kitesail Freebooter |
| 71 | +3 Plague Mare |
| 72 | +2 Deathgorge Scavenger |
| 73 | +1 Reclamation Sage |
| 74 | +3 Necrotic Wound |
| 75 | +2 Shapers' Sanctuary |
| 76 | +1 Mark of the Vampire |
| 77 | +``` |
| 78 | + |
| 79 | +#### Output |
| 80 | +``` |
| 81 | +------------------------------ MAIN DECK ------------------------------ |
| 82 | +
|
| 83 | +8 x 8 = 64 森/Forest |
| 84 | +8 x 7 = 56 沼/Swamp |
| 85 | +666 x 4 = 2664 草むした墓/Overgrown Tomb |
| 86 | +550 x 4 = 2200 森林の墓地/Woodland Cemetery |
| 87 | +9 x 4 = 36 ラノワールのエルフ/Llanowar Elves |
| 88 | +144 x 4 = 576 マーフォークの枝渡り/Merfolk Branchwalker |
| 89 | +50 x 3 = 150 探求者の従者/Seekers' Squire |
| 90 | +9 x 2 = 18 野茂み歩き/Wildgrowth Walker |
| 91 | +980 x 4 = 3920 翡翠光のレインジャー/Jadelight Ranger |
| 92 | +9 x 1 = 9 管区の案内人/District Guide |
| 93 | +45 x 3 = 135 貪欲なチュパカブラ/Ravenous Chupacabra |
| 94 | +9 x 2 = 18 ゴルガリの拾売人/Golgari Findbroker |
| 95 | +1580 x 4 = 6320 破滅を囁くもの/Doom Whisperer |
| 96 | +14 x 1 = 14 千の目、アイゾーニ/Izoni, Thousand-Eyed |
| 97 | +1280 x 2 = 2560 暗殺者の戦利品/Assassin's Trophy |
| 98 | +119 x 2 = 238 採取/Find (さいしゅ) 最終/Finality |
| 99 | +880 x 2 = 1760 ゴルガリの女王、ヴラスカ/Vraska, Golgari Queen |
| 100 | +1180 x 3 = 3540 秘宝探究者、ヴラスカ/Vraska, Relic Seeker |
| 101 | +
|
| 102 | +main ) price: 24278 |
| 103 | +
|
| 104 | +------------------------------ SIDEBOARD ------------------------------ |
| 105 | +
|
| 106 | +9 x 1 = 9 野茂み歩き/Wildgrowth Walker |
| 107 | +14 x 1 = 14 千の目、アイゾーニ/Izoni, Thousand-Eyed |
| 108 | +8 x 3 = 24 強迫/Duress |
| 109 | +10 x 3 = 30 渇望の時/Moment of Craving |
| 110 | +180 x 1 = 180 アルゲールの断血/Arguel's Blood Fast |
| 111 | +1280 x 2 = 2560 ヴラスカの侮辱/Vraska's Contempt |
| 112 | +30 x 2 = 60 最古再誕/The Eldest Reborn |
| 113 | +119 x 1 = 119 採取/Find (さいしゅ) 最終/Finality |
| 114 | +2490 x 1 = 2490 ビビアン・リード/Vivien Reid |
| 115 | +
|
| 116 | +side ) price: 5486 |
| 117 | +
|
| 118 | +total price (main + side): 29764 |
| 119 | +``` |
0 commit comments