Author Topic: Tool to scrape mame overviews from History.dat  (Read 3803 times)

farique

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Tool to scrape mame overviews from History.dat
« on: May 10, 2018, 02:12:01 PM »
Hi,

I was looking for a way to extract the games description on mame’s History.dat and convert them to overviews files but I could find nothing.
(Please don’t tell me there is an easy way to do it or that I could find it lying around on the interwebs. I have searched, and I haven’t found)
I don’t like the way the history plugin works and wasn’t in the mood to try to adapt it. Also, I wanted to bring mame closer to the working of the other emulators so I did a little tool to scrape the History.dat for overviews: Scrape History Overviews (of course).
You provide it with a list of roms and it will look on the History.dat for them and export a bunch of .cfg with their description to the overview format.

Hope it helps.

PS. SHO was done with Autoit and I have had problem before with Autoit and antivirus (it seems it is a common tool to write malicious scripts, so is flagged) but mine is not complaining right now.

Here is the Readme.txt
---------
Scrape History Overviews
Fred Rique 2018

Scrape History Overviews scrapes game information from Mame's history.dat and saves them as Attract Mode's overview format.
The conversion pulls the information from History.dat and save it in separated files with the name [rom name].cfg, adding "overview " at the start and converting the line feeds to "\n".

There are four versions of the program

SHO153.exe
SHO153n.exe
SHO197.exe
SHO197n.exe

The numbers are the History.dat version to be used with. They will not work on one another but should work on intermediary versions, the difference is the end token I am using, "- SOURCES -" on 153 and "- CONTRIBUTE -" on 197 so apply accordingly (yeah, I know I should be using "$end" but, oh well...)
The "n" is due to the fact that when they are bigger than the text box, the overviews do not show the first line on my layout and I need an extra line feed, so on these versions an "\n" is added after "overview ".

To search for the descriptions, you need to provide a list of roms SHO will be looking for. This must be a text file on the same folder as SHO with the name ListaFiltrada.txt (yeah, I know) one example is included. History.dat and a folder called Overviews also must be on the same folder as SHO.

That should be all.
When SHO finishes, the overviews will be saved on the Overviews folder and a log file with details will be created.

AND PLEASE:
The program should behave itself, but as always, work only on backups.



keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Tool to scrape mame overviews from History.dat
« Reply #1 on: May 26, 2019, 05:34:57 PM »
Bumping a long lost post. But this is a great idea! History.dat should be integrated. Will have to check out later.