Easy way of renaming Arcade roms?
-
@dudleydes said in Easy way of renaming Arcade roms?:
@MikeLang The simplest way may be to remove the
gamelist.xml
file that you are editing.If arcade roms haven't been scraped, then EmulationStation will auto-populate arcade roms with their full names, though , in some cases, this may include extra information. For example,
avsp.zip
is namedAlien vs. Predator (Euro 940520)
.For reference, here is a link to the XML file ES uses: https://raw.githubusercontent.com/RetroPie/EmulationStation/master/resources/mamenames.xml
It's the ' (Euro 940520)' bits I am editing out on the gamelist.xml. I just want the games listed with no bits and bobs tucked on the end. Some games have 'set 1' or 'prototype' etc in brackets. I want a nice tidy list like:
Revenge of Mike Myers
Revenge of the Monkey Army
Revenge of the Monkey Army II -
@MikeLang Then scraping is the answer.
It is possible to scrape roms on a PC. You can then copy over the
gamelist.xml
, leaving the images on your PC.For example, you can download a binary for your PC's OS for Steven Selph's Scraper from https://github.com/sselph/scraper/releases/tag/v1.4.6.
-
That looks like exactly the kind of thing I am after but unfortunately it's all a bit too complicated for me to grasp. I downloaded scraper_windows_386, extracted it into a folder where there is an application called scraper but don't know how to proceed.
-
@MikeLang You need to run the app from the Command Prompt - the Wiki has examples.
The
scraper_windows_386.zip
is for 32-bit (older) systems. If you have a modern computer, then you will likely need the 64-bit version,scraper_windows_amd64.zip
.You may want to take a look at the Universal XML scraper which uses a GUI instead of the command line. There are videos on YouTube on how to use the scraper.
Here is the thread: https://retropie.org.uk/forum/topic/5291/soft-universal-xml-scraper-v2-easy-scrape-with-high-quality-picture.
-
Still not really getting how to do this. This is what I am doing, create folder called 'arcade' on c:
Copy 20 roms into 'arcade' folder. Copy scraper.exe to 'arcade' folder and then run in command prompt.
Get message 'It appears that thegamesdb isn't set up.'
-
@MikeLang You can try a source other TheGamesDB - Screenscraper.fr is probably considered best. Selph's scraper also needs to be run in MAME mode.
Try the command:
scraper -mame -mame_src ss
[EDIT: changed
-console-src
to-mame-src
] -
I typed 'scraper -mame -mame_src ss' in command prompt, just get a lot of text:
'flag provided but not defined: -mame_scr'
'-workers N'
'use N worker threads to process roms. (default 1)' -
@MikeLang said in Easy way of renaming Arcade roms?:
'flag provided but not defined: -mame_scr'
You said you entered
-mame_src
, yet the error says that you entered-mame_scr
(which would be wrong). Which one is the typo? -
Yep, that's what I've done, typed it wrong. It's working now but the gamelist.xml it generates has a synopsis of the game. I only want these bits:
<game>
<path>./Gamename.zip</path>
<name>Game Name</name>
</game>If that is possible. Really appreciating all the help.
-
EDIT: Ignore - please see @mitu's suggestion below.
@MikeLang You can use the
sed
command. This is a Linux command so it will have to be done on your Pi. I recommend that you use SSH so that the command can copied and pasted.First, use
cd
to change the directory to the one containing yourgamelist.xml
file, then run:sed '/<desc>\|<image>\|<rating>\|<releasedate>\|<developer>\|<publisher>\|<genre>\|<players>/d' gamelist.xml
This command will output to the terminal what the amended version of
gamelist.xml
will look like.If you're happy, then you can run the command below to commit the changes. This will overwrite your
gamelist.xml
file so good idea to keep a copy of the the original.sed -i '/<desc>\|<image>\|<rating>\|<releasedate>\|<developer>\|<publisher>\|<genre>\|<players>/d' gamelist.xml
The only concern is when the
<desc>
entry runs for more than one paragraph. Thesed
will not catch the second and subsequent paragraphs. There's probably a way to include these but I don't know of any.Extra paragraphs will make the XML file invalid as it will have unmatched tags and ES may not load. The extra paragraphs can be manually deleted in a text editor searching for
</desc>
string. -
@dudleydes It's easier with
xmlstarlet
:xmlstarlet ed -d '//game/desc' gamelist.xml
will delete all
desc
child nodes of thegame
node. Repeat for any other tag you'd like removed (favorite/image/video/etc.). -
@dudleydes said in Easy way of renaming Arcade roms?:
First, use
cd
to change the directory to the one containing yourgamelist.xml
file, then run:Already stuck, running putty, don't know how to change directory from 'pi@retropie:/ $' to:
\RETROPIE\configs\all\emulationstation\gamelists\arcade\gamelist
-
@mitu Thank you.
The command below will give a preview of amended
gamelist.xml
:xmlstarlet ed -d '//game/desc | //game/image | //game/releasedate | //game/rating | //game/developer | //game/publisher | //game/genre | //game/players' gamelist.xml
To write changes, add
--inplace
as below:xmlstarlet ed --inplace -d '//game/desc | //game/image | //game/releasedate | //game/rating | //game/developer | //game/publisher | //game/genre | //game/players' gamelist.xml
-
@MikeLang Try
cd /opt/retropie/configs/all/emulationstation/gamelists/arcade
After this command, run
ls
to checkgamelist.xml
is there. -
@MikeLang said in Easy way of renaming Arcade roms?:
Already stuck, running putty, don't know how to change directory from 'pi@retropie:/ $' to:
\RETROPIE\configs\all\emulationstation\gamelists\arcade\gamelist
Just an addition to @dudleydes' post: Windows uses backslashes (
\
) as directory dividers. The official Retropie image is running on Linux, which uses slashes as directory dividers (/
). -
@dudleydes said in Easy way of renaming Arcade roms?:
@mitu Thank you.
The command below will give a preview of amended
gamelist.xml
:xmlstarlet ed -d '//game/desc | //game/image | //game/releasedate | //game/rating | //game/developer | //game/publisher | //game/genre | //game/players' gamelist.xml
That's not giving me a full preview of gamelist, I'm getting something like this:
gamelist.xml:1697.16: xmlParseEntityRef: no name
<name>Game name</name>
^
gamelist.xml:1889.17: xmlParseEntityRef: no name
<name>Game name 2</name>
^The original command 'sed '/<desc>|<image>|<rating>|<releasedate>|<developer>|<publisher>|<genre>|<players>/d' gamelist.xml' is giving a fuller list but has entry run issues as you mentioned.
-
@MikeLang You'll have to be more specific, maybe you can upload your final gamelist.xml somewhere so we can check.
-
I know why I was getting that weird error now, it was related to having '&' in the name of a game. My example didn't help matters seeing as I didn't type '&'.
The list it generates still doesn't have the games I haven't picked, for example say the arcade rom folder has 300 games and the gamelist.xml file lists 200 roms. There's still 100 games that I have to manually pick in order for them to appear in the gamelist.xml file.
Thanks for all the help everyone I've learned a great deal from all your input.
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.