DATMapper

The DATMapper will compare checksums between ROMs in two DAT files, and provide mappings between ROMs that may have changed name.

DATMapper has no specific arguments.

API

class romsearch.DATMapper(platform=None, config_file=None, config=None, logger=None, log_line_sep='=', log_line_length=100)[source]

Map names in dats from old dat to new dat

Will take a dat file, and a platform-matching dat file in some mapping folder, and search through MD5 checksums to find matches

Parameters:
  • platform (str, optional) – Platform name. Defaults to None, which will throw a ValueError

  • config_file (str, optional) – Configuration file. Defaults to None

  • config (dict, optional) – Configuration dictionary. Defaults to None

  • logger (logging.Logger, optional) – Logger instance. Defaults to None

  • log_line_length (int, optional) – Line length of log. Defaults to 100

compare_dats(dat, old_dat)[source]

Compare dats, producing a dictionary of mappings between them

Parameters:
  • dat – New dat to compare to

  • old_dat – Old dat to compare against

get_old_dat()[source]

Get the old dat from the mapped DAT dir

run(dat)[source]

Run the DATMapper, using an input dat

Parameters:

dat – Parsed dat dictionary