Skip to main content

Find magic cards based on the Name on the card.

Project description

Generic badge made-with-python Build Status

MTG_Card_Identifier

MTG_Card_Identifier is a python based program to identify Magic: The Gathering cards based on the Card name in the image that the user uploads.


    __  ___  ______   ______          ______                       __
   /  |/  / /_  __/  / ____/         / ____/  ____ _   _____  ____/ /
  / /|_/ /   / /    / / __          / /      / __ `/  / ___/ / __  /
 / /  / /   / /    / /_/ /         / /___   / /_/ /  / /    / /_/ /
/_/  /_/   /_/     \____/          \____/   \__,_/  /_/     \__,_/

    ____       __                 __     _     ____    _
   /  _/  ____/ /  ___    ____   / /_   (_)   / __/   (_)  ___    _____
   / /   / __  /  / _ \  / __ \ / __/  / /   / /_    / /  / _ \  / ___/
 _/ /   / /_/ /  /  __/ / / / // /_   / /   / __/   / /  /  __/ / /
/___/   \__,_/   \___/ /_/ /_/ \__/  /_/   /_/     /_/   \___/ /_/

   _____                   _             __     __
  / ___/  _____   _____   (_)    ____   / /_   / /
  \__ \  / ___/  / ___/  / /    / __ \ / __/  / /
 ___/ / / /__   / /     / /    / /_/ // /_   /_/
/____/  \___/  /_/     /_/    / .___/ \__/  (_)
                             /_/

Installation

Linux

# Run the install.sh script
$ sudo sh install.sh

Windows

  • Run:
> pip3 install -r requirements.txt
  • May have to install Tesseract from here

Usage

$ python3 -img IMAGE [-p PERCENT] [-url URL] [-ci CI] [-show SHOW]

MTG_Card_Identifier: Find magic cards based on the Name on the card.

optional arguments:
-h, --help            show this help message and exit
-p PERCENT, --Percent PERCENT
                      Enter the percent you want the comparison to be [whole numbers].
-url URL, --URL URL   Tell the script that the -img is a url. Usage [ -url y ]
-ci CI, --CI CI       Print out more information about a card if the script is 100 percent a match. 
                      [y or n]
-show SHOW, --Show SHOW
                      Show guessed image. [y or n]

required named arguments:
-img IMAGE, --Image IMAGE
                      Insert path to the Image here.

Requirements

Python PIP Packages:

Sets included:

Set Name Cards Available Total Cards in Set Set Name Cards Available Total Cards in Set
Arabian Nights 92 92 Lorwyn 301 301
Antiquities 100 101 Morningtide 150 150
Legends 310 310 Shadowmoor 301 302
The Dark 119 122 Eventide 180 180
Fallen Empires 187 187 Shards of Alara 249 249
Ice Age 383 383 Conflux 145 145
Homelands 140 140 Alara Reborn 145 145
Alliances 199 199 Worldwake 145 145
Mirage 350 351 Rise of the Eldrazi 248 248
Visions 167 167 Scars of Mirrodin 249 249
Weatherlight 167 167 Mirrodin Besieged 155 155
Tempest 350 350 New Phyrexia 175 175
Stronghold 143 143 Innistrad 284 284
Exodus 143 143 Dark Ascension 171 171
Urza's Saga 350 356 Avacyn Restored 244 244
Urza's Legacy 143 143 Return to Ravnica 274 274
Urza's Destiny 143 143 Gatecrash 249 249
Mercadian Masques 350 350 Dragon's Maze 156 156
Nemesis 143 143 Theros 249 249
Prophecy 143 144 Born of the Gods 165 165
Invasion 355 356 Journey into Nyx 165 165
Planeshift 146 146 Khans of Tarkir 269 269
Apocalypse 148 148 Fate Reforged 185 185
Odyssey 350 352 Dragons of Tarkir 264 264
Torment 143 143 Oath of the Gatewatch 186 187
Judgment 143 143 Shadows over Innistrad 330 331
Onslaught 350 350 Eldritch Moon 223 223
Legions 145 145 Kaladesh 274 278
Scourge 143 143 Aether Revolt 194 197
Mirrodin 306 306 Amonkhet 287 287
Darksteel 165 165 Hour of Devastation 209 209
Fifth Dawn 165 165 Ixalan 299 299
Champions of Kamigawa 307 307 Rivals of Ixalan 212 212
Betrayers of Kamigawa 165 165 Dominaria 280 280
Saviors of Kamigawa 165 165 War of the Spark 275 311
Ravnica City of Guilds 306 306 Theros Beyond Death 283 356
Guildpact 165 165 Zendikar Rising 368 391
Dissension 180 180 Zendikar 269 269
Coldsnap 155 155 Ikoria Lair of Behemoths 289 384
Time Spiral 301 301 Battle for Zendikar 299 299
Planar Chaos 165 165 Guilds of Ravnica 273 273
Future Sight 180 180 Ravnica Allegiance 273 273

NOTE: All images belong to Magic: The Gathering and Wizards of the Coast respectively

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MTG_Card_Identifier-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

MTG_Card_Identifier-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file MTG_Card_Identifier-0.0.1.tar.gz.

File metadata

  • Download URL: MTG_Card_Identifier-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3

File hashes

Hashes for MTG_Card_Identifier-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2ad0bce59c2582b9bb933ff7f2236619bc77d65d93026fbc6c0fa2e8c51cfd45
MD5 f942b92239a16dc995c9255aee5d75a3
BLAKE2b-256 6256d8a30b75e1dff4b9118766b6757e0f911889c26ae71f48b51f2e91eb93b0

See more details on using hashes here.

File details

Details for the file MTG_Card_Identifier-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: MTG_Card_Identifier-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3

File hashes

Hashes for MTG_Card_Identifier-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab8f2eede3c66185bc4890f8bbdafc5ac122cab36c3ce8f36f3c1ecef3643ea
MD5 57f8c0b1b322ffd5abee997093b2dcda
BLAKE2b-256 9220094d48a1637a28799cb5e068a3a4aa073dea96a17ec990fc8c577211c6d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page