46 lines
905 B
PHP
Executable file
46 lines
905 B
PHP
Executable file
#!/usr/bin/php
|
|
<?php
|
|
require "vendor/autoload.php";
|
|
require "Game.php";
|
|
require "Source.php";
|
|
require "Wikipage.php";
|
|
$config = parse_ini_file("./config.ini");
|
|
$loader = new \Aura\Autoload\Loader;
|
|
$loader->register();
|
|
$loader->addPrefix('Source', 'Source');
|
|
|
|
if (!isset($argv[1])) {
|
|
echo 'Please provide the direct URL to the game page.'.PHP_EOL;
|
|
die();
|
|
}
|
|
$url = strtolower($argv[1]);
|
|
$game = new Game;
|
|
|
|
function check($classname) {
|
|
global $game;
|
|
global $url;
|
|
|
|
$cname = 'Source\\'.$classname;
|
|
$cl = (new $cname());
|
|
if ($cl->checkPage($url)) {
|
|
$game = $cl->page($url);
|
|
if ($game) {
|
|
$page = new Wikipage($game);
|
|
$page->create();
|
|
}
|
|
}
|
|
}
|
|
|
|
check ('Urq', 'urq');
|
|
check ('Qsp');
|
|
check ('Kvester');
|
|
check ('Apero');
|
|
check ('Instead');
|
|
check ('Hyperbook');
|
|
check ('HyperbookEn');
|
|
check ('Questbook');
|
|
check ('Anivisual');
|
|
check ('Itch');
|
|
check ('Gamejolt');
|
|
check ('Steam');
|