You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
877 B
33 lines
877 B
#!/usr/bin/env php |
|
<?php declare(strict_types=1); |
|
|
|
// Set up autoloader for third-party dependencies |
|
require_once __DIR__ . '/vendor/autoload.php'; |
|
|
|
use Aviat\AnimeClient\Command; |
|
use ConsoleKit\Console; |
|
|
|
$GLOBALS['_SERVER']['HTTP_HOST'] = 'localhost'; |
|
|
|
const APP_DIR = __DIR__ . '/app'; |
|
const TEMPLATE_DIR = APP_DIR . '/templates'; |
|
|
|
// ----------------------------------------------------------------------------- |
|
// Start console script |
|
// ----------------------------------------------------------------------------- |
|
try |
|
{ |
|
(new Console([ |
|
'clear:cache' => Command\CacheClear::class, |
|
'clear:thumbnails' => Command\ClearThumbnails::class, |
|
'refresh:cache' => Command\CachePrime::class, |
|
'refresh:thumbnails' => Command\UpdateThumbnails::class, |
|
'lists:sync' => Command\SyncLists::class, |
|
'sync:lists' => Command\SyncLists::class |
|
]))->run(); |
|
} |
|
catch (Throwable) |
|
{ |
|
|
|
} |
|
|
|
|