wip
This commit is contained in:
1 parent
db98383da0
commit
2085d0f512
6 files changed
+70
-21
No files matched your search
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use App\Console\Commands\Grapper\Sofascore\Grapper;
|
||||
use App\Console\Commands\Grapper\Sofascore\GrapperTest;
|
||||
use App\Console\Commands\Grapper\Sofascore\Helper\ClearDir;
|
||||
use App\Console\Commands\Grapper\Sofascore\Helper\RemoveDir;
|
||||
use App\Console\Commands\Grapper\Sofascore\Helper\SetStorage;
|
||||
use App\Console\Commands\Grapper\Sofascore\MakeExcel;
|
||||
use App\Console\Commands\Grapper\Sofascore\Rose;
|
||||
@@ -28,7 +29,7 @@ class Grap extends Command
|
||||
|
||||
public static string $useragent = '4';
|
||||
|
||||
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--r} {--m} {--f} {--R} {--S}';
|
||||
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--g} {--r} {--c} {--m} {--f} {--F} {--R} {--S}';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
@@ -41,8 +42,11 @@ class Grap extends Command
|
||||
$txt = 'PARAMETERS' . PHP_EOL;
|
||||
$txt .= '--d debug' . PHP_EOL;
|
||||
$txt .= '--r restart range' . PHP_EOL;
|
||||
$txt .= '--f force' . PHP_EOL;
|
||||
$txt .= '--f force Events' . PHP_EOL;
|
||||
$txt .= '--F force DayTournament links' . PHP_EOL;
|
||||
$txt .= '--c clear grap dir' . PHP_EOL;
|
||||
$txt .= '--m mail only' . PHP_EOL;
|
||||
$txt .= '--g grap & excel only' . PHP_EOL;
|
||||
$txt .= '--R read file' . PHP_EOL;
|
||||
$txt .= '--S save to file' . PHP_EOL;
|
||||
$txt .= '--folder' . PHP_EOL;
|
||||
@@ -66,7 +70,8 @@ class Grap extends Command
|
||||
case 1:
|
||||
// DAILY
|
||||
SetStorage::set(1);
|
||||
// MoveToArchive::move(1);
|
||||
|
||||
RemoveDir::remove();
|
||||
|
||||
// with --m just resend mail
|
||||
if (! self::$options['m']) {
|
||||
@@ -74,21 +79,31 @@ class Grap extends Command
|
||||
MakeExcel::create();
|
||||
}
|
||||
|
||||
SendMail::run(1);
|
||||
// with --g just grap & excel
|
||||
if (! self::$options['g']) {
|
||||
SendMail::run(1);
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
// LAST 3 DAYS
|
||||
SetStorage::set(2);
|
||||
self::$options['f'] = 1;
|
||||
|
||||
ClearDir::clear();
|
||||
if (self::$options['c']) {
|
||||
ClearDir::clear();
|
||||
}
|
||||
|
||||
Grapper::load(2);
|
||||
self::$options['day'] = 1;
|
||||
SetStorage::set(1);
|
||||
Grapper::load(1);
|
||||
MakeExcel::create('day');
|
||||
|
||||
MakeExcel::create();
|
||||
self::$options['day'] = 5;
|
||||
SetStorage::set(1);
|
||||
Grapper::load(1);
|
||||
MakeExcel::create('day');
|
||||
|
||||
SendMail::run(1);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
// RANGE
|
||||
|
||||
Reference in new issue
Block a user