bbbbbr / gbtoolsid

A command line app for identifying tools used to build Game Boy ROMs
The Unlicense
25 stars 3 forks source link

Provide a JSON schema #3

Closed avivace closed 9 months ago

avivace commented 2 years ago

It would be nice to have JSON schema describing the JSON output of the tool, with all the possible values

bbbbbr commented 1 year ago

I don't have any experience writing formal json schema (seems like it would require some study to do it properly), but would something such as below be sufficient?

Rough summary of JSON schema

Enabling output

Use the -oj argument to enable JSON output format

Example output:

Invocation:./gbtoolsid -oj test/zgb_template_2022.0.gb

{
"file": "zgb_template_2022.0.gb",
"toolsName": "GBDK", "toolsVersion": "2020.4.1.0+",
"engineName": "ZGB", "engineVersion": "2022.0+",
"musicName": "hUGETracker", "musicVersion": "SuperDisk",
"soundfxName": null, "soundfxVersion": null
}

Notes:

Current Possible Values

{
    "file": [<string quoted filename>],
    "toolsName": [null, "GBDK", "Turbo Rascal Syntax Error"],
    "toolsVersion": [null, "", "Unknown", "<various>"],
    "engineName":  [null, "GBStudio", "ZGB"],
    "engineVersion": [null, "", "Unknown", "<various>"],
    "musicName": [null, "GHX", "DevSound", "DevSound", "Visual Impact", "MusyX", "Freaq", "LSDJ", "hUGETracker", "Trackerboy engine", "Black Box Music Box", "Lemon", "GBT Player", "Carillon Player", "MPlay", "GBSoundSystem"],
    "musicVersion": [null, "", "Unknown", "<various>"],
    "soundfxName": [null, "FX Hammer", "CBT-FX", "VAL-FX", "VGM2GBSFX"],
    "soundfxVersion": [null, "", "Unknown", "<various>"],
}
bbbbbr commented 9 months ago

Closing this as resolved