Skip to content
This repository has been archived by the owner on Dec 21, 2018. It is now read-only.

Commit

Permalink
The foreignNames multiverseid field is now an integer, see issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
Sembiance committed Sep 14, 2015
1 parent 8ba5e70 commit 0c68c23
Show file tree
Hide file tree
Showing 87 changed files with 105 additions and 89 deletions.
2 changes: 1 addition & 1 deletion build/rip.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function addForeignNamesToCard(card, cb)
{
var languageHref = cardRow.querySelector("td:nth-child(1) a").getAttribute("href");
var foreignMultiverseid = querystring.parse(languageHref.substring(languageHref.indexOf("?")+1)).multiverseid;
card.foreignNames.push({language : language, name : foreignCardName, multiverseid : foreignMultiverseid});
card.foreignNames.push({language : language, name : foreignCardName, multiverseid : +foreignMultiverseid});
}
});

Expand Down
2 changes: 1 addition & 1 deletion json/10E.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/5DN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/7ED.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/8ED.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/9ED.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ALA.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/APC.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ARB.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ARC.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/AVR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/BNG.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/BOK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/C13.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/C14.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/CHK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/CMD.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/CNS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/CON.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/CSP.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DD2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDE.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDF.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDG.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDH.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDI.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDJ.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDL.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDM.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDO.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DDP.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DGM.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DIS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DKA.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DPA.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DST.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/DTK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/EVE.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/FRF.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/FRF_UGIN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/FUT.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/GPT.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/GTC.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/HOP.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/INV.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ISD.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/JOU.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/JUD.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/KTK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/LGN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/LRW.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M10.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M11.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M12.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M13.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M14.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/M15.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/MBS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/MM2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/MOR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/MRD.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/NPH.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ODY.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ONS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ORI.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/PC2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/PLC.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/PLS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/RAV.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ROE.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/RTR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/S00.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/SCG.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/SHM.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/SOK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/SOM.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/THS.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/TOR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/TSB.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/TSP.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/UNH.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/WWK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion json/ZEN.json

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions util/tmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ tiptoe(

function checkSet(setCode, cb)
{
base.info("Processing %s", setCode);

tiptoe(
function getJSON()
{
Expand All @@ -46,14 +48,20 @@ function checkSet(setCode, cb)

set.cards.forEach(function(card)
{
if(card.name==="Grave Titan")
if(card.hasOwnProperty("foreignNames"))
{
base.info("%s: %s : %s", setCode, card.name, card.artist);
card.foreignNames.forEach(function(foreignName)
{
if(foreignName.multiverseid)
foreignName.multiverseid = +foreignName.multiverseid;
else
delete foreignName.multiverseid;
});
}
});

//fs.writeFile(path.join(__dirname, "..", "json", setCode + ".json"), JSON.stringify(set), {encoding : "utf8"}, this);
this();
fs.writeFile(path.join(__dirname, "..", "json", setCode + ".json"), JSON.stringify(set), {encoding : "utf8"}, this);
//this();
},
function finish(err)
{
Expand Down
8 changes: 8 additions & 0 deletions web/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "3.2.3",
"when": "2015-09-14",
"changes": [
"The 'foreignNames' 'multiverseid' field is now correctly an integer rather than a string."
],
"updatedSetFiles" : ["10E-x","5DN-x","7ED-x","8ED-x","9ED-x","ALA-x","APC-x","ARB-x","ARC-x","AVR-x","BNG-x","BOK-x","C13-x","C14-x","CHK-x","CMD-x","CNS-x","CON-x","CSP-x","DD2-x","DDE-x","DDF-x","DDG-x","DDH-x","DDI-x","DDJ-x","DDK-x","DDL-x","DDM-x","DDN-x","DDO-x","DDP-x","DGM-x","DIS-x","DKA-x","DPA-x","DST-x","DTK-x","EVE-x","FRF-x","FRF_UGIN-x","FUT-x","GPT-x","GTC-x","HOP-x","INV-x","ISD-x","JOU-x","JUD-x","KTK-x","LGN-x","LRW-x","M10-x","M11-x","M12-x","M13-x","M14-x","M15-x","MBS-x","MM2-x","MOR-x","MRD-x","NPH-x","ODY-x","ONS-x","ORI-x","PC2-x","PLC-x","PLS-x","RAV-x","ROE-x","RTR-x","S00-x","SCG-x","SHM-x","SOK-x","SOM-x","THS-x","TOR-x","TSB-x","TSP-x","UNH-x","WWK-x","ZEN-x"]
},
{
"version": "3.2.2",
"when": "2015-09-08",
Expand Down

0 comments on commit 0c68c23

Please sign in to comment.