2016-04-19 13:02:50 -04:00
|
|
|
#!/usr/bin/env php
|
2016-12-20 12:58:37 -05:00
|
|
|
<?php declare(strict_types=1);
|
2016-04-19 13:02:50 -04:00
|
|
|
|
2017-03-27 10:09:45 -04:00
|
|
|
// Set up autoloader for third-party dependencies
|
2018-01-18 16:21:45 -05:00
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
2017-03-27 10:09:45 -04:00
|
|
|
|
|
|
|
use Aviat\AnimeClient\Command;
|
2018-01-31 15:44:48 -05:00
|
|
|
use ConsoleKit\Console;
|
2016-04-19 13:02:50 -04:00
|
|
|
|
2020-12-11 14:26:54 -05:00
|
|
|
$GLOBALS['_SERVER']['HTTP_HOST'] = 'localhost';
|
2016-04-19 13:02:50 -04:00
|
|
|
|
2022-01-07 12:33:01 -05:00
|
|
|
const APP_DIR = __DIR__ . '/app';
|
|
|
|
const TEMPLATE_DIR = APP_DIR . '/templates';
|
2020-08-21 12:30:01 -04:00
|
|
|
|
2017-04-17 16:13:36 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2016-04-19 13:02:50 -04:00
|
|
|
// Start console script
|
2017-04-17 16:13:36 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2018-01-18 16:21:45 -05:00
|
|
|
try
|
|
|
|
{
|
2018-01-31 15:44:48 -05:00
|
|
|
(new Console([
|
2018-11-01 22:15:20 -04:00
|
|
|
'clear:cache' => Command\CacheClear::class,
|
|
|
|
'clear:thumbnails' => Command\ClearThumbnails::class,
|
|
|
|
'refresh:cache' => Command\CachePrime::class,
|
|
|
|
'refresh:thumbnails' => Command\UpdateThumbnails::class,
|
2018-09-27 16:45:12 -04:00
|
|
|
'lists:sync' => Command\SyncLists::class,
|
2020-04-22 17:52:07 -04:00
|
|
|
'sync:lists' => Command\SyncLists::class
|
2018-01-18 16:21:45 -05:00
|
|
|
]))->run();
|
|
|
|
}
|
2021-02-18 12:48:59 -05:00
|
|
|
catch (\Throwable)
|
2018-01-18 16:21:45 -05:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2016-04-19 13:02:50 -04:00
|
|
|
|