Dinhani Posted Friday at 05:57 PM Share Posted Friday at 05:57 PM It seems that only Arcade/MAME games have the Series field populated. I was expecting to find console games like Pokemon, Donkey Kong Country, Paper Mario and several other to have this field populated, but it is always empty. Is there a way to start populating this field for non-arcade games in the official metadata database? 1 Quote Link to comment Share on other sites More sharing options...
Dinhani Posted Sunday at 10:32 AM Author Share Posted Sunday at 10:32 AM (edited) With some Python scripting, I was able to populate other platforms series based on Wikipedia/Wikidata data. First I exported a CSV file with all available games and series from Wikidata with this SPARQL query. Then I wrote a script that gets the WikipediaURL field from games metadata and tries to match it with the Wikipedia URL in the Series CSV file. Based on the matches I populate the Series field. Now almost all games have the field populated. The query I used in case it goes offline on Wikidata: SELECT (?Game AS ?GameID) ?GameLabel ?GameLink (?Series AS ?SeriesID) ?SeriesLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' . } ?Game wdt:P31 wd:Q7889 . OPTIONAL { ?GameLink schema:about ?Game . ?GameLink schema:inLanguage 'en' . ?GameLink schema:isPartOf <https://en.wikipedia.org/> . } ?Game wdt:P179 ?Series . } Edited Sunday at 10:33 AM by Dinhani 1 Quote Link to comment Share on other sites More sharing options...
Buccaneer Posted Sunday at 11:19 AM Share Posted Sunday at 11:19 AM Sounds nice. Is it possible that you upload your metadata files somewhere so I can import them with that: Quote Link to comment Share on other sites More sharing options...
GlauberC Posted Monday at 11:02 PM Share Posted Monday at 11:02 PM (edited) Wow, that's amazing! Would it be possible that you share the script you used. I don't really know anything about coding but I don't mind taking a look to see if I can get this to work Edited Monday at 11:06 PM by GlauberC misspelling Quote Link to comment Share on other sites More sharing options...
AstroBob Posted 21 hours ago Share Posted 21 hours ago Nice job with the script there, that is a very cool idea! To clarify, the LaunchBox Games DB doesn't contain any series information (even for arcade). The series info you see for arcade is coming from MAME, as MAME has a built-in function that generates a giant text file filled with a ton of info about all the games they support and we generate that file from MAME and use it to populate all metadata fields. The reason we don't populate the LaunchBox games DB with series information is that it is incredibly subjective (some people prefer the main series, others want each individual sub-series, and some want them both). So right now we leave it up to the user to define. That said, we could certainly do a better job of offering some ways for users to grab this info, and arguably it is a bit confusing that we fill it in for arcade (albeit via MAME) but not others. But great job on the script there, I haven't had a chance to test it myself but seems like it could fill a good use-case 🙌 Quote Link to comment Share on other sites More sharing options...
Dinhani Posted 4 hours ago Author Share Posted 4 hours ago (edited) @GlauberC I attached in this post the script and data for you to use. You need to adjust the value on line 13 with the path to your LaunchBox installation. Please be careful because it will read and write all you imported games and it will clear the Series field from all games before updating. Make a backup of all your data before running it. launchbox-set-series-field.py Series.csv Edited 4 hours ago by Dinhani Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.