It is currently 16 Apr 2024, 15:11
   
Text Size

Magic Online DB parsed!

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Magic Online DB parsed!

Postby Max mtg » 02 Jul 2011, 15:20

Hello,

Hope, anyone comments on my topic on these sunny and warm days.
Well, I have made a mtgo card database parser and now one can have the latest oracle-fresh cards and their descriptions right from magic online.

The program is provided in source codes, so no malware should be inside.
There are three projects:
- WinUI is a windows appication to browse through the database and has a nice "make booster" function (no need to buy boosters just to see what will be there inside).
- Logics contains reader for mtgo data
- WebUI is a asp.net mvc website where one can see all cards that belong to each set and get some detailed information on each card by clicking on its image ot name.

Image Image

Image Image Image

Here is the download link: http://www.mediafire.com/?oaamu9tykb7eyy5
To build it one needs either Visual Studio 2010 or Visual Web Developer 2010 Express with asp.net mvc 3 framework installed.

If you do not see much pictures compared to screenshots, check the web.config and app.config files (to set up paths to mtgo and saved cards images (used by forms app) on your disk). Ask questions here is it does not work.

Personally I have no idea what to do about this next. A browser-based client for magic online (or its analogue) would be most wonderful, but I have no idea how deal with the copyrights wizards have implied on the game and artworks from it.

Sorry, before Sept 28th the file was password-protected. There is not password on the rar now
Last edited by Max mtg on 28 Sep 2011, 04:33, edited 1 time in total.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Magic Online DB parsed!

Postby kevlahnota » 28 Sep 2011, 02:31

Hi, what's the password?
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: Magic Online DB parsed!

Postby Max mtg » 28 Sep 2011, 04:32

Thanks for your question. I was sure the archive does not need any password and was wondering why there are no replies to my topic.

Of course, there is a version without password: http://www.mediafire.com/?oaamu9tykb7eyy5
It hasn't changed much for last months since my efforts were focused on Forge.

Please post any questions right here
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Magic Online DB parsed!

Postby TheWolfen » 24 Apr 2012, 21:35

any way to get this working again? at the moment im getting an ArrayOutOfBoundsException, if i try to compile it. :/

also, my visual C# 2010 express with ASP can't open the webUI project, maybe because this would be for Visual Web Developer 2010 then?!

any help would be appreciated. :)
User avatar
TheWolfen
 
Posts: 7
Joined: 31 Jan 2012, 11:04
Has thanked: 4 times
Been thanked: 2 times

Re: Magic Online DB parsed!

Postby mark » 19 May 2012, 20:20

if you just need the database, you can use the one in the attached zip file. I used magiccard.info's downtime today to write my own database :-)
I also wrote a minimalistic CGI that enables me to search the db from my browser, but I did not include the CGI because everyone can do this better after 30 minutes of hacking, and in his favorite language too :-)

Here is the readme:
You can download cockatrice from http://cockatrice.de/ and use it's oracle program to download
the carddata you need. This will create a file cards.xml, which is a fat and slow, plain XML
datafile.

The oracle2sql.pl Perl script converts this XML file into SQL instructions, which you can
redirect into a file, e.g. with
perl oracle2sql.pl > database.sql

You can feed this file into sqlite3, e.g. with the command
sqlite3 -init database.sql database.db

Then you can write your application/CGI/whatever to use the database.db file, which is smaller
and much faster than this XML bloat.
You can see the database scheme at the beginning of the oracle2sql.pl script; there is a table
for the sets, one for cards and one for the n-m-relation between sets and cards.
Extend it if you like, e.g. HQ URLs are not used for now.

For your convenience I included all mentioned files in this archive, except for cockatrice sources,
of course. I used the git version, it works.
This archive includes all cards up to and including Avacyn Restored.
Attachments
database.zip
Magic db (xml+sql+sqlite3+perl-converter) including AVR
(2.64 MiB) Downloaded 1013 times
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times


Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 16 guests

Login Form