Gamelist Excel export script
-
@used2berx Excel has a straightforward Export to XML functionality, as long as you feed it the correct schema (xsd) it's really easy to export. One thing that it's not correctly exported is the dates, but that we might address separately. I did a few tests - using my export to get back a gamelist.xml file - and seems simple enough to try.
So, a few questions:- What version of Excel are you using ? (2007, 2010, 2013, 2016)
- Do you have a sample sheet for me to try out ? A few lines would be enough and should get you covered for 3. You can give me a Google docs sheet that I can copy and test on it.
-
@mitu Nice. I wasn't aware of the export to .xml functionality. Google Docs may have this as well, and it might be pretty easy to export the Excel to GD since I won't be making it look fancy like my compatibility spreadsheets will be. I believe I have Excel 2007, although I can't remember if I've ever installed it on my "new" ancient computer I'm working from right now. I'll have to answer that one when I get around to this and I'll try to figure out any GD stuff on my own and let you know how it goes.
I have an old
gamelist.xml
file from about a month ago on my computer I believe. It's outdated from what I have now, but there isn't anything important missing from it that would be on it now. For our testing purposes here it should have most of what you need.There will still be some more tags down the road to add as well. I have a request in with @meleu for some additional tags that we'll need, but he hasn't had time to get to them yet. At this stage I'm just trying to get all the ducks in a row as much as I can while I'm still working on another aspect of the project.
Give me a few minutes and I should be able to get that
gamelist.xml
file to you. I'll also pull out one specific good example of all of the current tags meleu has in the script to post right up on the board here to view.BTW... thanks for doing this. I'm sure most people won't need these tags for now, and some people using them might actually not like even having them. Maybe if you're going to add these tags for me you could have a separate option to load an "Rx Spreadsheet" or something to avoid this?
-
Oh... also BTW....
As far as the "date problem" goes, one of my requests to @meleu was to have an additional tag in there. I don't remember what the exact name of the tag was right now, but it's an alternate date tag that has the "human readable" date on it instead of the one we need to convert it to for use with RetroPie. My
synopsis.txt
files for use on the XBox emulators use the human readable date. When he adds this, both tags will be in thegamelist.xml
file. Maybe this could help you out as well? -
@mitu Damn.... The gamelist is too big to upload here and when I zip it I get a notification saying that I do not have enough privlidges to preform this action.
I'll just put up a sample game entry for now and if you think you need the full file I'll upload it elsewhere and send it to you.
I also looked back into the request to meleu and I have manually added all of the tags that I have requested that he make in his script. At this point I can't think of other tags that might be necessary, but there might be a couple that I've missed. Fingers crossed. :)
<game> <name>Mario in Some Usual Day</name> <path>/home/pi/RetroPie/roms/nes/(3) Unlicensed - Homebrew/(3_10) Super Mario Bros Updates/Mario in Some Usual Day.zip</path> <image>/home/pi/RetroPie/Media/nes/Artwork/Cart/Mario In Some Usual Day.png</image> <video/> <marquee/> <thumbnail/> <desc>Some usual day isn't so usual after all. This game features enemies from Zelda, Metroid, and Kirby, new power-ups, and a brand-new secret coin system. And yes, that is a fire-ball-chucking Raccoon Mario below. This is a complete hack of Super Mario Bros 3, featuring 4 new worlds and 1 secret world! All worlds are filled with new levels, new graphics, new asm mods and more! <link>https://www.romhacking.net/hacks/53/</link> <releasedate>19900101T000000</releasedate> <releasetext>1990</releasetext> `Text date that is in our synopsis.txt files` <hackreleasedate/> <transreleasedate/> <developer>Nintendo R&D2</developer> <publisher>Nintendo of America Inc.</publisher> <genre>Action / Platformer</genre> <players>1</players> <playerstext>1</playerstext> (Need this to properly convert back to synopsis after edits. Just a pure rip of the synopsis information without your code for converting it to an ES friendly field. Examples: "1 to 2 VS", "1 or 2 CO-OP") <region>USA</region> <platform>nes</platform> <media>Cartridge</media> <controller>NES Gamepad</controller> <gametype>Hack</gametype> <xtrasname>Mario In Some Usual Day</xtrasname> <originaltitle>Super Mario Bros. 3</originaltitle> <alternatetitle/> <hackedby>JaSp</hackedby> <translatedby/> <version>1.1</version> <boxfront>/home/pi/RetroPie/Media/nes/Artwork/Box Front/Mario In Some Usual Day.png</image> <cart>/home/pi/RetroPie/Media/nes/Artwork/Cart/Mario In Some Usual Day.png</cart> <title>/home/pi/RetroPie/Media/nes/Artwork/Titles/Mario In Some Usual Day.jpg</title> <action>/home/pi/RetroPie/Media/nes/Artwork/Action/Mario In Some Usual Day.jpg</action> <threedbox>/home/pi/RetroPie/Media/nes/Artwork/3D Boxart/Mario In Some Usual Day.png</threedbox> <gamefaq/> <manual/> <vgmap/> <license/> <programmer/> <musician/> </game>
Please let me know if you have any questions at all. I will try to get back to you ASAP. I need to sleep soon and might not be able to get to you before I go to work. I will answer any questions you have in no more than 36 hours from now. :)
-
@used2berx What I meant for example was an actual Excel file, don't you want to convert from Excel to a gamelist.xml file ? My script does not convert - right now - all the fields you have in this sample gamelist.xml file, it only reads the standard ES metadata tags.
You want me to modify the export script to produce an Excel from this sample gamelist XML file ? -
@mitu Oh... yeah. I don't have any excel or Google Spreadsheet with any of this information now. I haven't run your script at all yet.
I was actually asking if you could add new columns for your spreadsheet conversion program that would use all of the tags listed in the
gamelist.xml
file above. That way, after I do the editing to fields like<desc/>
,<genre/>
,<publisher/>
, etc., then I could convert the spreadsheet back to agamelist.xml
file and none of the other fields would be missing when converted back.Some of these fields will actually never be used in ES, but I'm hoping once I start releasing sets that some of them are, such as manuals, gamefaqs and more image types. The fields that will never be used in ES are actually things that will be carried all the way back to the
synopsis.txt
files, which are individual files with the game rom name that are used to display all of the game information in the XBox Madmab Edition emulators. (These files are currently how meleu's script gets all of the individual game information into agamelist.xml
file, and with some other wizardry he's managed to also add all of the file location tags so long as media with the exact same name as the rom/synopsis.txt name is in the corresponding location).This is why I had suggested a "Regular Spreadsheet" and a separate "Rx Spreadsheet" option so people who just want the ES tags wouldn't have all of my tags cluttering up their spreadsheet... or you wouldn't have to go out of your way to make a completely separate script for me that would have to be updated separately if you added other cool stuff to the one you have now.
Sorry for the confusion. :|
-
@mitu BTW... figured I should show you an example of what the
synopsis.txt
files look like. This is forMario in Some Usual Day.txt
, same game as the example above:Mario in Some Usual Day Original Title: Super Mario Bros. 3 Platform: Nintendo Entertainment System Region: USA Media: Cartridge Controller: NES Gamepad Genre: Action / Platformer Gametype: Hack Release Year: 1990 Hack Release Year: 2005 Developer: Nintendo R&D2 Publisher: Nintendo of America Inc. Hacked by: JaSp Version: 1.1 Players: 1 _________________________ Some usual day isn't so usual after all. This game features enemies from Zelda, Metroid, and Kirby, new power-ups, and a brand-new secret coin system. And yes, that is a fire-ball-chucking Raccoon Mario below. This is a complete hack of Super Mario Bros 3, featuring 4 new worlds and 1 secret world! All worlds are filled with new levels, new graphics, new asm mods and more! https://www.romhacking.net/hacks/53/ http://www.mobygames.com/game/nes/super-mario-bros-3
Mario in Some Usual Day.txt
is the same name as the<xtrasname/>
tag in the gamelist.xml. All media for this game such as the rom, synopsis, artwork, etc. will have this exact file name. -
@used2berx Here it is
Installation instructions are the same as my initial script, needs the python module mentioned there in order to work.
You can run it with-h
to see the usage, by default reads agamelist.xml
from the running dir and exports togamelist.xlsx
there, but you can change the paths via parameters.
Note that the gamelist fragment you posted has some structure errors - mismatched tags or missing closing tags. You need to validate the XML structure before running the export, since it will error out otherwise.You can add more tags (see line 120) to be parsed and added to the export. I think I covered most of the ones in your example, but you can freely add more.
-
@mitu Thank you so much man. :)
I don't think I'll have a chance to really dive into this and test it for about two more weeks. Because of the nature of the cart work I'm doing and the way that I have to have my current compatibility spreadsheet that I use to do all of my work off of, I absolutely have to finish them before I can move on to anything else. Works's been getting in the way of it this week, but I will have some free time next week to hopefully finish that up and move on to this so I can give you feedback, and ask you any questions I might have about being able to add any missing tags myself in the future.
Once this is all in place I hope @meleu has some free time to put the other tags in his script that will make converting from synopsis.txt to gamelist.xml to spreadsheet and all the way back again without losing any data a snap.
Please bear with me until I can get the time to properly devote to this. :)
Oh... and yeah. It looks like I forgot to add the
</desc>
tag when I was doing some manual edits to the file above. I wanted to make sure I added all the tags I could currently think that we'd need... even the ones that meleu hasn't put in the script yet. I didn't see any others that were missing the closing tags. We shouldn't have any problems with this once the script is taking care of this and I don't have to manually edit anything in the gamelist.xml. -
I was just thinking about how to have an excel game list.. and voilà! :)
However since I'm really a noob with linux commands, I'm having an error and no xlsx file at the end.
'''
pi@retropie:~ $ python export.py /home/pi/RetroPie/roms/export_list.xlsx
2018-09-09 12:03:13,223 INFO Emulationstation systems file used: /home/pi/.emulationstation/es_systems.cfg
Traceback (most recent call last):
File "export.py", line 584, in <module>
systems = parse_systems()
File "export.py", line 261, in parse_systems
gamelist = et.parse(gamelist_path)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 657, in parse
self._root = parser.close()
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
'''
(sorry I can't remember the 'code' character everytime..) -
@papinist Can you run the script with the
-d
flag (debug) to find out which gamelist file has this error, then upload thegamelist.xml
somewhere so I can take a look ? -
sure, here it is:
https://pastebin.com/QsT8qVjAthanks for the help!
-
@papinist OK, so the problem seems to be the gamelist for the
nds
system (/home/pi/.emulationstation/gamelists/nds/gamelist.xml
), can you add it to pastebin.com also so I can take a look ? -
Actually, every time I exit from emulationstation to terminal, I got two errors regarding nds (see attached pic).
I am not sure what the problem is - this is a pre-made image that I edited to suit my needs - it has background music that I removed (this is probably the third error regarding autostart.sh), and many systems that I simply deleted from roms folder (and also image\video previews), but I only have this error regarding nds.I don't have nds folder in 'roms' so I haven't a gamelist.xml to get!
EDIT: The gamelist.xml at the path reported in that error is a blank file.
-
@papinist said in Gamelist Excel export script:
EDIT: The gamelist.xml at the path reported in that error is a blank file.
Remove the file, this should get rid of the error in the export and also the error in Emulationstation. Btw, your disk is really low on free space, you should do something to free up space so you don't get into other errors.
-
You are always the man, @mitu : it worked! Thanks so much!
Now I'm looking at the numbers and they are a bit off - total games 7850 in xlsx, but 7917 in emulationstation.
I see that Daphne is missing completely (12 games), and every sistem is missing something.
Also I have to admit that I didn't read the last page, maybe you have already explained this.Re: space. Do you think it's low? This is a closed system, I have no plans to do updates in future (it is meant for a little boy) so I thought that 1.4 gb was enough!
-
@papinist said in Gamelist Excel export script:
Now I'm looking at the numbers and they are a bit off - total games 7850 in xlsx, but 7917 in emulationstation.
I see that Daphne is missing completely (12 games), and every sistem is missing something.I don't think the script will correctly count the systems where the game is an actual folder. If you could add the
daphne
systemgamelist.xml
to pastebin.com, I could take a look to see why it's not read correctly. A log file from running with the-d
switch can also help to determine where's the error.Note that the export will check if the ROM is present, so if you have the
Parse metadata only
option checked, then you'll see more entries than you might actually have on disk.Attach the
gamelist.xml
for a system that's not exported and tell me which entry/entries are not appearing in the export, I'll take a look. -
This is daphne's gamelist.txt https://pastebin.com/uRFWiKnC
As example, ES reports 63 games for Atari 7800; Checking roms folder it has 63 roms; xls reports 57 games.
(how can I attach a file here? This message editor is really difficult to use)
-
@papinist said in Gamelist Excel export script:
how can I attach a file here
I meant upload it to pastebin.com. You can only attach images and the gamelist is too large to paste it inline.
-
Understood!
Atari 7800 gamelist.txt https://pastebin.com/wusbd0DJ
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.