andrewgioia / keyrune

Magic: the Gathering set symbol pictographic font
Other
448 stars 44 forks source link

[feature request] JSON file that maps set code to keyrune data #190

Open PsycoNova opened 2 years ago

PsycoNova commented 2 years ago

Hey, TYSM for this project!

I was hoping we could get a file, probably json, that maps a set-code to different keyrune data points. Specifically, I'd like a mapping from the set-code to the font's unicode, but this could also be extended for other data-points if need be.

{ "STX": { "unicode": "E975", ... }, ... }

For example in my project all I really want/need is the font files, but without manually entering or parsing your css/html the unicode is unknown. I'd like to keep these set symbols up-to-date automatically with my current cron-script that keeps my set cache updated.

Thanks in advance!

PsycoNova commented 2 years ago

Heh sorry, I should have looked closer.. A similar request was made here, but I think mapping to multiple data points would be more beneficial.

148

{ "STX": { "unicode": "E975" }, ... }

andrewgioia commented 2 years ago

@PsycoNova This is a great idea and something I started doing for the v4 release, which I should have up as a new branch soon for anyone to start poking around in. Currently the json object looks like this:


{
  "core": {
    "lea": {
      "name": "Limited Edition Alpha",
      "display": "Alpha",
      "nicknames": [
        "Alpha",
      ],
      "rarity": "e000",
      "border": "e001",
      "inner": "e002",
      "release": "1993-08-05",
      "subgroup": false,
      "version": "4.0.0",
      "aliases": false
    }, [...]
  }, [...]
}

I have it grouped by category but it could be flat as well depending on use case/need.