ROMSearch
This is the main part that controls the various other modules. It essentially calls everything (given user preferences), and so while it doesn’t really do all that much on its own, is the interface to everything else.
ROMSearch has 2 modes, the default will parse from the .dat file then download relevant files, to minimize disc space used (filter_then_download). For completionists/data hoarders, there’s also a download_then_filter option, which will download and then filter from the downloaded files.
For more details on the ROMSearch arguments, see the config file documentation.
API
- class romsearch.ROMSearch(config_file=None, config=None, default_config=None, regex_config=None, logger=None)[source]
General search tool to get ROMs downloaded and organized into files
- Parameters:
config_file (str, optional) – path to config file. Defaults to None.
config (dict, optional) – configuration dictionary. Defaults to None.
default_config (dict, optional) – default configuration dictionary. Defaults to None.
regex_config (dict, optional) – regex configuration dictionary. Defaults to None.
- get_all_games(platform, platform_config=None, log_line_sep='=', log_line_length=100)[source]
Get a dictionary of all games and ROM associations
- Parameters:
platform (str) – Platform name
platform_config (dict) – Platform configuration. If None, will load in from defaults
log_line_sep (str, optional) – log line separator. Defaults to “=”.
log_line_length (int, optional) – log line length. Defaults to 100.
- get_platform_config(platform)[source]
Get platform configuration
- Parameters:
platform (str) – platform name
- get_ra_hash_dict(platform, log_line_length=100)[source]
Get RetroAchievements hash dictionary
- Parameters:
platform (str) – Platform name
log_line_length (int, optional) – log line length. Defaults to 100.
- run(log_line_sep='=', log_line_length=100)[source]
Run ROMSearch
- Parameters:
log_line_sep (str, optional) – log line separator. Defaults to “=”.
log_line_length (int, optional) – log line length. Defaults to 100.
- run_romparser(rom_files, platform, game, dat, retool, ra_hash, platform_config, log_line_length=100)[source]
Run the ROMParser
- Parameters:
rom_files – Dict of ROM files
platform (str) – Platform name
game (str) – Game name
dat (dict) – Dat dictionary
retool (dict) – Retool dictionary
ra_hash (dict) – RAHash dictionary
platform_config (dict) – Platform configuration
log_line_length (int, optional) – log line length. Defaults to 100.