Create categorization service

This commit is contained in:
DariusIII
2025-12-09 17:03:43 +01:00
parent 03c4681d39
commit 179943db8a
31 changed files with 2196 additions and 2684 deletions
-33
View File
@@ -1,33 +0,0 @@
<?php
require __DIR__.'/../vendor/autoload.php';
use Blacklight\Categorize;
$c = (new ReflectionClass(Categorize::class))->newInstanceWithoutConstructor();
$c->poster = '';
$samples = [
'Starfield-RUNE',
'Baldurs.Gate.3.TENOKE',
'ELDEN.RING-EMPRESS',
'Horizon.Zero.Dawn-CODEX',
'Cyberpunk.2077.GOG',
'Forza.Horizon.5.ElAmigos',
'The.Witcher.3.Wild.Hunt.PLaza',
'Resident.Evil.4.Remake-FITGIRL',
'Red.Dead.Redemption.2.DODI-Repack',
'Some.Game.SKiDROW',
'Awesome.Game.SteamRip',
'Great.Game.Repack-FitGirl',
'Indie.Title.DRM-Free.GOG',
'Cool.Game.PC.Game.2024',
'Windows.10.Title.Repack',
'Title-[PC]-DRMFree',
];
foreach ($samples as $name) {
$c->releaseName = $name;
$res = $c->isPCGame();
echo ($res ? 'MATCH' : 'NO-MATCH')."\t$name\n";
}
-16
View File
@@ -1,16 +0,0 @@
<?php
require __DIR__.'/../vendor/autoload.php';
$rc = new ReflectionClass(\Blacklight\Games::class);
$games = $rc->newInstanceWithoutConstructor();
$inputs = [
'[FitGirl] Red.Dead.Redemption.2.v1.0.1436.28.Repack',
'Baldurs_Gate_3_v1.0.2_MULTI12-EMPRESS',
'Starfield.Update.1.7.29.Patch-FLT',
];
foreach ($inputs as $in) {
$res = $games->parseTitle($in);
echo $in, ' => ', json_encode($res, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), "\n";
}