This commit is contained in:
salam committed 2026-08-21 12:11:29 +02:00
1 parent 28ed78c864
commit 59f2eeec11
8 files changed
+342 -132

No files matched your search

+29 -17
View File
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
use App\Actions\PlayerPerSeason;
use App\Console\Commands\Grapper\Sofascore\Grapper;
use App\Console\Commands\Grapper\Sofascore\GrapperTest;
use App\Console\Commands\Grapper\Sofascore\Helper\SetStorage;
use App\Console\Commands\Grapper\Sofascore\MakeExcel;
use App\Console\Commands\Grapper\Sofascore\Rose;
@@ -16,14 +17,18 @@ use Illuminate\Console\Command;
class Grap extends Command
{
public static $options = [];
public static string $storage;
public static string $zipfile;
public static string $folder;
public static string $excel;
public static string $useragent = '4';
protected $signature = 'grp {id=0} {day=0} {--folder=} {--d} {--r} {--f}';
protected $signature = 'grp {id=0} {day=0} {--folder=} {--d} {--r} {--f} {--R} {--S}';
public function handle()
{
@@ -33,25 +38,28 @@ class Grap extends Command
self::$options['base_url'] = 'https://www.sofascore.com/';
if (! self::$options['id']) {
$txt = 'PARAMETERS' . PHP_EOL;
$txt .= '--d debug' . PHP_EOL;
$txt .= '--r restart range' . PHP_EOL;
$txt .= '--f force' . PHP_EOL;
$txt .= '--folder' . PHP_EOL;
$txt .= '-----------------------------------------------------------' . PHP_EOL;
$txt .= 'FUNCTION' . PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)' . PHP_EOL;
$txt .= ' 2 grapper DATE' . PHP_EOL;
$txt .= ' 3 grapper RANGE' . PHP_EOL;
$txt .= ' 4 grapper ROSE' . PHP_EOL;
$txt .= ' 5 import to excel from folder' . PHP_EOL;
$txt .= ' 6 playeer/season' . PHP_EOL;
$txt .= ' 7 settings to local' . PHP_EOL;
$txt .= ' 11 move SQL' . PHP_EOL;
$txt = 'PARAMETERS'.PHP_EOL;
$txt .= '--d debug'.PHP_EOL;
$txt .= '--r restart range'.PHP_EOL;
$txt .= '--f force'.PHP_EOL;
$txt .= '--R read file'.PHP_EOL;
$txt .= '--S save to file'.PHP_EOL;
$txt .= '--folder'.PHP_EOL;
$txt .= '-----------------------------------------------------------'.PHP_EOL;
$txt .= 'FUNCTION'.PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)'.PHP_EOL;
$txt .= ' 2 grapper DATE'.PHP_EOL;
$txt .= ' 3 grapper RANGE'.PHP_EOL;
$txt .= ' 4 grapper ROSE'.PHP_EOL;
$txt .= ' 5 import to excel from folder'.PHP_EOL;
$txt .= ' 6 playeer/season'.PHP_EOL;
$txt .= ' 7 settings to local'.PHP_EOL;
$txt .= ' 11 move SQL'.PHP_EOL;
$txt .= ' 12 testing url for grapping'.PHP_EOL;
Notice::note($txt, 'b', 1);
}
Notice::note('Task Id ' . self::$options['id'], 'gb');
Notice::note('Task Id '.self::$options['id'], 'gb');
switch (self::$options['id']) {
@@ -111,6 +119,10 @@ class Grap extends Command
SqlMover::run();
break;
case '12':
GrapperTest::load();
break;
default:
Notice::note('function not implemented yet', 'br', 1);
}