Author Topic: [Tool] Convert emulationstation/launchbox xml database "DESC" to Overview Attrac  (Read 1022 times)

IceLancer

  • Full Member
  • ***
  • Posts: 44
    • View Profile
[Tool] Convert emulationstation/launchbox xml database "DESC" to Overview Attrac
--
edit
hyperspin doesnt have description.. :)
As title says.

Here it is

https://mega.nz/#!B9YxiSDD!XRrJduRZnkgZxPm8lHFvvFgxa_FOmAbicPeTsM1Ivdg


make folder , put .py in it.
copy database.xml to folder where .py is
if using another xml ,rename it to gamelist.xml
Make sub folder named "out" no quotes.

run the tool

result will be [romname].zip.cfg files for attract mode.
bulk rename .zip.cfg to .cfg only
copy files to attract romlist [emulatorname] folder ,Enjoy
(it can be used to scrape from launcBox) just replace 2 name param's where to look for data.Be aware that LB has mostly broken format of xml's as its not updating them propeprly. If that happens fix the xml

NOTE:
Some files may end up with 0 info in them. If that happens check which files are in question and look in xml what might be the cause of problem. Usually poor formating is the reason
Also in case of launchbox, u will first have to manually find and replace lines in it
example:
Code: [Select]
<ApplicationPath>..\..\roms\Cave\mushitam.zip</ApplicationPath>
find and replace ..\..\roms\Cave\ so it becames
Code: [Select]
<ApplicationPath>mushitam.zip</ApplicationPath>
launchbox is not recommended for use.But its easier to match data with it. its xml output is a disaster tho. It tends to create double named info inside xml on separate places for same game. Nothing i can do about that.In that case it script will overwrite good info with empty info when it runs into it.Those doubles are always stored at bottom of exml, so best to manually find first damaged info and remove with rest of it from xml
P.S
I already started sharing some of overview info files in my theme topic, i wonder why not everyone will? We can get some nice database like that. Providing that all rom names are up to the code.

P.P.S
if u have interesting tools to share ,now might be the time? :)

Neosys

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
HI!

I have a problem with the doit.py.

---

Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
==== RESTART: C:\doit.py ====
Traceback (most recent call last):
  File "C:\doit.py", line 3, in <module>
    reload(sys)
NameError: name 'reload' is not defined

---

I have Python 3.6.3 for windows.

I have to use linux for that?


Neosys

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Now the error message is gone.

but I do not get a new xml in the out folder.

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
==== RESTART: c:\doit.py ====
>>>


EDIT: OK! It works.



« Last Edit: November 23, 2017, 04:33:24 AM by Neosys »

IceLancer

  • Full Member
  • ***
  • Posts: 44
    • View Profile
what are u trying to convert?


u arent suppose to get xml in out folder
out folder will get tons of cfg files for emulator with data in it. Dont forget to rename the extension of out files. They will be [original extension]+cfg

xml needs to be named gamelist.xml and it has to be from emulationstation database or launchbox

P.S
if u have damaged xml like i said in case of launchbox which really does its job poorly, u will have to fix the xml and remove bad data

IceLancer

  • Full Member
  • ***
  • Posts: 44
    • View Profile
added new py includes fixes for special characters.
replace('\n','').replace("&quot;","\"").replace("&gt;",">").replace("&lt;","<").replace("&amp;","&"))

hh83

  • Newbie
  • *
  • Posts: 3
    • View Profile
Great tool. However, I can't get it to work with Mame gamelist.xml. Just closes after opening. Neo Geo worked, as well as virtual boy so far. Any ideas?

IceLancer

  • Full Member
  • ***
  • Posts: 44
    • View Profile
Great tool. However, I can't get it to work with Mame gamelist.xml. Just closes after opening. Neo Geo worked, as well as virtual boy so far. Any ideas?
yes, activate tool throu command promt to tell me error log.
basically open cmd in folder activate py script in it