The software I've built imports all this data into a relational database, and initially used multiverseid as a primary key for the cards, which is great as long as all the cards coe from Gatherer. It runs into problems nowthat sets like "Happy Holidays" are in the dataset, though, as multiverseid is null for those cards.
Is anybody else here doing something similar? If so, what are you using for a primary key? I need it to be the same each time a card is reindexed, which means I can't use an auto-increment field, since each set is being imported separately and asynchronously. I've thought of using a combination of values from the card concatenated together (like ${setcode}-${name-as-ascii}-${number-in-set}), but that won't always produce a unique value for each card either, since not all cards have set numbers, and names are obviously non-unique.
Any ideas?
Private Mod Note
():
Rollback Post to RevisionRollBack
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
I use an autoincrement and do some coding trickery to not reimport cards. I honestly feel like it's the best way, though it is a little more code. The major thing that's bitten me in the butt is the avatars that have the same name as cards. In Gatherer they put "Avatar" after the name, which isn't technically correct, either. Example: http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=182282
I wound up ignoring avatars completely after that problem was found.
Private Mod Note
():
Rollback Post to RevisionRollBack
My MTG Site: Graceful Stats (deckbuilding website that actually works on mobile)
Hey, I just noticed that in Gatherer (and the comprehensive rules), Phyrexian mana symbols are written with the P in the second half, e.g., {W/P}, while in your format they come first: {P/W}. Is there a reason for that?
Aye, yes, the symbols are reversed. Back when I first was working on it, I noticed that the 'human text' for these symbols on gatherer (the image 'alt' text) is written as 'Phyrexian White' instead of the other way around. Also with other dual mana costs like 2/W, the non-color part comes first. So I made the decision at the time that it made more sense to order it as {P/W}.
You are correct though that the the rules (Rule 107.4f) have it the other way around.
I'm hesitant to change it though at this point as a lot of software and sites consume MTGJSON now and it would almost certainly break them if they process this mana text.
So I am leaning on just leaving it as is for now, as it doesn't seem like too big of a deal.
The software I've built imports all this data into a relational database, and initially used multiverseid as a primary key for the cards, which is great as long as all the cards coe from Gatherer. It runs into problems nowthat sets like "Happy Holidays" are in the dataset, though, as multiverseid is null for those cards.
Is anybody else here doing something similar? If so, what are you using for a primary key? I need it to be the same each time a card is reindexed, which means I can't use an auto-increment field, since each set is being imported separately and asynchronously. I've thought of using a combination of values from the card concatenated together (like ${setcode}-${name-as-ascii}-${number-in-set}), but that won't always produce a unique value for each card either, since not all cards have set numbers, and names are obviously non-unique.
Any ideas?
Aye, this is a tricky problem. You are correct, several cards are not on Gatherer and thus don't have multiverseids. I actually don't have a great suggestion as to how to handle this.
Hopefully some folks who use MTGJSON will reply here with how they handle it in their projects (thanks negativereview!)
Since you already host the card images, I don't suppose there'd be any chance you'd additionally host the mana symbol images and expansion symbol images?
RE: Symbols - Sir, I could kiss you. Figuratively speaking, of course How often do you expect to update them?
RE: Card Ids - I've seen a couple of good ideas (thanks aeos and negativeview :)). I might write a quick script that iterates over all the cards and chucks the ids generated with those methods into a map to check for uniqueness...
Private Mod Note
():
Rollback Post to RevisionRollBack
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
RE: Symbols - Sir, I could kiss you. Figuratively speaking, of course How often do you expect to update them?
Just like the JSON and the card images, as soon as the data becomes available, I'll try and get it onto mtgimage.com right away.
For the symbols, this relies on someone creating the new set symbols in SVG format and then uploading it to any of the numerous symbol forum threads (I have subscribed to them). So once I see a new set symbol SVG is available, I'll add it to the site as soon as possible.
Hate to double post but great job on mtgimage.com,. If you open source the missing symlinks in github I'd love to help and contribute. (if help is needed.)
For the symbols, this relies on someone creating the new set symbols in SVG format and then uploading it to any of the numerous symbol forum threads (I have subscribed to them). So once I see a new set symbol SVG is available, I'll add it to the site as soon as possible.
I have one or two that I could contribute, once I pass my 5 post minimum... Can you use XCF files from GIMP?
Private Mod Note
():
Rollback Post to RevisionRollBack
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
For the symbols, this relies on someone creating the new set symbols in SVG format and then uploading it to any of the numerous symbol forum threads (I have subscribed to them). So once I see a new set symbol SVG is available, I'll add it to the site as soon as possible.
Can you use XCF files from GIMP?
In the end, we need it in a vector format. Not sure if GIMP supports this, but if the image was done with vector/path/gradient tools only (no bitmaps) then you may be able to export XCF to SVG (either built in or with a GIMP plugin).
If you are not sure if your XCF was created this way, feel free to send me the file and I'll take a look and see (you can post it to the forums or if that doesn't work for you, you can e-mail me: robert@cosmicrealms.com
conspiracy is on gatherer now, which seems a bit soon, but i guess there's no prerelease buffer
Thanks for the update. I have a script that runs and notifies me of new sets automatically. It's on a 1 hour timer so I get notified of a new set within 2 hours of it going on gatherer.
Right this moment I'm doing a legalities update on MTGJSON which will take another few hours, so I'm not sure I'll be able to get to Conspiracy tonight.
I should have Conspiracy up on both MTGJSON and MTGImage tomorrow morning/afternoon.
In the end, we need it in a vector format. Not sure if GIMP supports this, but if the image was done with vector/path/gradient tools only (no bitmaps) then you may be able to export XCF to SVG (either built in or with a GIMP plugin).
They're definitely vectors. I'll try and export them to SVG and load them up in InkScape if I get a moment tonight, and see how they behave.
Private Mod Note
():
Rollback Post to RevisionRollBack
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
I've updated the site:
* Added set: Magic: The Gathering—Conspiracy (CNS)
* Added new card type: Conspiracy
* Added new booster card type: draft-matters
* Legalities now show any special conditions in parenthesis
* Updated legalities for all cards in all sets
I think this is the second or third request I've had for full foreign language text, so when I get back from vacation (early December) (and after I fix some MTGImage issues) I will look seriously into adding foreign language text.
Thanks a lot for the suggestions, I'll reply here once I have some updates to share on the foreign text.
I'd like to add one more request for foreign texts and also images.
Keep in mind that the gatherer is horribly incomplete and sometimes even plain wrong when it comes to foreign languages. I've seen printings being labelled as one language but being another, printings for languages that don't really exist (I have yet to see a french unhinged card) and for many older editions no other languages than English are listed (e.g. 4th Ankh of Mishra).
For that matter I've thought about some kind of crowd-sourced card-database where everyone could submit additional data or corrections for review. However if you already thought about this, I would be reinventing the wheel. On the other hand it would be nice to feed this information back.
Someone pointed out that the "text" format option for Gatherer is gone. Is that going to have an impact on this project?
Nope, that doesn't impact me at all.
The latest gatherer update did break some of my parsing, but I've got most of it corrected. Still working on it and then once I've got it all working fully, will add the new Vintage Masters set.
one issue with vintage masters: the p9 have the rarity 'bonus'; could this be changed to 'special'? that would make it consistent with other sets, eg time spiral timeshifted, and is how the rarity is called in this article: http://www.wizards.com/magic/magazine/article.aspx?x=mtg/daily/arcana/1491
Weird that Wizards has "Bonus" for the rarity on gatherer even though their article clearly states it is the "Special" rarity like cards are from other sets. I will correct this and change it to Special.
I also forgot to add a booster field to VMA, I will also correct this.
Both changes will have to wait a few days though. I am currently out of town and will make the changes once I get back.
As for RSS or a mailing list as additional ways to be notified of changes, I will give this some thought.
Private Mod Note
():
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So, a question for the floor:
The software I've built imports all this data into a relational database, and initially used multiverseid as a primary key for the cards, which is great as long as all the cards coe from Gatherer. It runs into problems nowthat sets like "Happy Holidays" are in the dataset, though, as multiverseid is null for those cards.
Is anybody else here doing something similar? If so, what are you using for a primary key? I need it to be the same each time a card is reindexed, which means I can't use an auto-increment field, since each set is being imported separately and asynchronously. I've thought of using a combination of values from the card concatenated together (like ${setcode}-${name-as-ascii}-${number-in-set}), but that won't always produce a unique value for each card either, since not all cards have set numbers, and names are obviously non-unique.
Any ideas?
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
I wound up ignoring avatars completely after that problem was found.
Aye, yes, the symbols are reversed. Back when I first was working on it, I noticed that the 'human text' for these symbols on gatherer (the image 'alt' text) is written as 'Phyrexian White' instead of the other way around. Also with other dual mana costs like 2/W, the non-color part comes first. So I made the decision at the time that it made more sense to order it as {P/W}.
You are correct though that the the rules (Rule 107.4f) have it the other way around.
I'm hesitant to change it though at this point as a lot of software and sites consume MTGJSON now and it would almost certainly break them if they process this mana text.
So I am leaning on just leaving it as is for now, as it doesn't seem like too big of a deal.
Aye, this is a tricky problem. You are correct, several cards are not on Gatherer and thus don't have multiverseids. I actually don't have a great suggestion as to how to handle this.
Hopefully some folks who use MTGJSON will reply here with how they handle it in their projects (thanks negativereview!)
cards.json
{
"black lotus": {
...
"urls": {
"LEA": "http://mtgimage.com/multiverseid/3.jpg",
"LEB": "http://mtgimage.com/multiverseid/298.jpg",
"2ED": "http://mtgimage.com/multiverseid/600.jpg"
}
}
this is essentially "$(ascii name)-$(set code)"
Good news! I've just added symbols to http://mtgimage.com
Enjoy
RE: Card Ids - I've seen a couple of good ideas (thanks aeos and negativeview :)). I might write a quick script that iterates over all the cards and chucks the ids generated with those methods into a map to check for uniqueness...
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
Just like the JSON and the card images, as soon as the data becomes available, I'll try and get it onto mtgimage.com right away.
For the symbols, this relies on someone creating the new set symbols in SVG format and then uploading it to any of the numerous symbol forum threads (I have subscribed to them). So once I see a new set symbol SVG is available, I'll add it to the site as soon as possible.
I have one or two that I could contribute, once I pass my 5 post minimum... Can you use XCF files from GIMP?
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
> Can you use XCF files from GIMP?
Sembiance:
> this relies on someone creating the new set symbols in SVG format
In the end, we need it in a vector format. Not sure if GIMP supports this, but if the image was done with vector/path/gradient tools only (no bitmaps) then you may be able to export XCF to SVG (either built in or with a GIMP plugin).
If you are not sure if your XCF was created this way, feel free to send me the file and I'll take a look and see (you can post it to the forums or if that doesn't work for you, you can e-mail me: robert@cosmicrealms.com
conspiracy is on gatherer now, which seems a bit soon, but i guess there's no prerelease buffer
Thanks for the update. I have a script that runs and notifies me of new sets automatically. It's on a 1 hour timer so I get notified of a new set within 2 hours of it going on gatherer.
Right this moment I'm doing a legalities update on MTGJSON which will take another few hours, so I'm not sure I'll be able to get to Conspiracy tonight.
I should have Conspiracy up on both MTGJSON and MTGImage tomorrow morning/afternoon.
They're definitely vectors. I'll try and export them to SVG and load them up in InkScape if I get a moment tonight, and see how they behave.
Minouris's Library - Collection manager and deck builder. It's nifty - Check it out!
* Added set: Magic: The Gathering—Conspiracy (CNS)
* Added new card type: Conspiracy
* Added new booster card type: draft-matters
* Legalities now show any special conditions in parenthesis
* Updated legalities for all cards in all sets
I'd like to add one more request for foreign texts and also images.
Keep in mind that the gatherer is horribly incomplete and sometimes even plain wrong when it comes to foreign languages. I've seen printings being labelled as one language but being another, printings for languages that don't really exist (I have yet to see a french unhinged card) and for many older editions no other languages than English are listed (e.g. 4th Ankh of Mishra).
For that matter I've thought about some kind of crowd-sourced card-database where everyone could submit additional data or corrections for review. However if you already thought about this, I would be reinventing the wheel. On the other hand it would be nice to feed this information back.
Optimize your Wantlist on the MagicCardMarket and the corresponding support thread in this forum.
Mi grupo de Magic en Osorno
Nope, that doesn't impact me at all.
The latest gatherer update did break some of my parsing, but I've got most of it corrected. Still working on it and then once I've got it all working fully, will add the new Vintage Masters set.
I also forgot to add a booster field to VMA, I will also correct this.
Both changes will have to wait a few days though. I am currently out of town and will make the changes once I get back.
As for RSS or a mailing list as additional ways to be notified of changes, I will give this some thought.