Skip to content

Commit

Permalink
Feature: infer abbreviated years in game names (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm committed May 8, 2024
1 parent 56ad757 commit 4ee0d8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/datParentInferrer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export default class DATParentInferrer extends Module {
.replace(/\((CW|CW-R|FW|GW|GW-R|LW|PD|SW|SW-R)\)/i, '') // copyright
.replace(/\((alpha|beta|preview|pre-release|proto)\)/i, '') // development
.replace(/(\[(cr|f|h|m|p|t|tr|o|u|v|b|a|!)([0-9]+| [^\]]+)?\])+/i, '')
// ***** Specific cases *****
.replace(/'([0-9][0-9])/, '$1') // year abbreviations
// ***** Console-specific *****
// Nintendo - Game Boy
.replace(/\(SGB Enhanced\)/i, '')
Expand Down
4 changes: 4 additions & 0 deletions test/modules/datParentInferrer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ test.each([
'Doom 3 (USA, Asia)',
'Doom 3 (USA, Asia) (Limited Collector\'s Edition)',
], 'Doom 3 (Europe) (En,Fr,Es,It)'],
[[
'All Star Tennis \'99 (Europe) (En,Fr,De,Es,It)',
'All Star Tennis 99 (USA)',
], 'All Star Tennis 99 (USA)'],
// https://emulation.gametechwiki.com/index.php/GoodTools
[[
'A game (1990)(Side A).zip',
Expand Down

0 comments on commit 4ee0d8c

Please sign in to comment.