diff --git a/DAMON.md b/DAMON.md new file mode 100644 index 00000000..7608a6d9 --- /dev/null +++ b/DAMON.md @@ -0,0 +1,19 @@ + + + + + sofascore grapper + COM.NUH.GRAPPER + ProgramArguments + + /Users/hermanntelser/Sites/nuhodds_fi4/setup.sh 13 + + StartCalendarInterval + + Hour + 02 + Minute + 15 + + + \ No newline at end of file diff --git a/app/Console/Commands/Grapper/Sofascore/EventsDatabase.php b/app/Console/Commands/Grapper/Sofascore/EventsDatabase.php index 18697360..4bfe1dc4 100644 --- a/app/Console/Commands/Grapper/Sofascore/EventsDatabase.php +++ b/app/Console/Commands/Grapper/Sofascore/EventsDatabase.php @@ -2,9 +2,9 @@ namespace App\Console\Commands\Grapper\Sofascore; +use App\Console\Commands\Grapper\Sofascore\Tools\LoadDays; +use App\Console\Commands\Grapper\Sofascore\Tools\LoadTournaments; use App\Console\Commands\Nuh; -use App\Models\SofaScoreDay; -use App\Models\SofaScoreTournament; use App\Utilities\Notice; use Illuminate\Support\Facades\File; @@ -15,21 +15,18 @@ class EventsDatabase public static function load() { $debug = Nuh::$options['d'] ?? 0; + $print = Nuh::$options['p'] ?? 0; - $sport_id = Nuh::$options['sport_id']; + + $langsam = Nuh::$options['l'] ?? 0; - $days = SofaScoreDay::where('sport_id', $sport_id)->where('enabled', 1)->pluck('day')->toArray(); - $tornaments = SofaScoreTournament::where('sport_id', $sport_id)->where('enabled', 1)->get(); - - if (! $days) { - Notice::note('No days active in DB', 'r', 1); - } - if (! $tornaments) { - Notice::note('No tornaments active in DB', 'r', 1); - } + $days = LoadDays::load(); + + $tornaments = LoadTournaments::load(); if ($print) { - dd($days, $tornaments); + Notice::note($days, 'p'); + Notice::note($tornaments->toArray(), 'b', 1); } foreach ($days as $day) { @@ -46,8 +43,7 @@ class EventsDatabase $url = Nuh::$options['base_url']."api/v1/unique-tournament/$tournament->tournament_id/scheduled-events/$day"; - $rand = rand(500000, 1000000); - + $rand = self::rand($langsam); if ($debug) { Notice::note("Sleep $rand msec", 'y'); } @@ -84,7 +80,7 @@ class EventsDatabase $url = Nuh::$options['base_url']."api/v1/event/$event_id/statistics"; - $rand = rand(500000, 1000000); + $rand = self::rand($langsam); if ($debug) { Notice::note("Sleep $rand msec", 'y'); } @@ -101,8 +97,8 @@ class EventsDatabase *********************************/ $url = Nuh::$options['base_url']."api/v1/event/$event_id/lineups"; - - $rand = rand(500000, 1000000); + + $rand = self::rand($langsam); if ($debug) { Notice::note("Sleep $rand msec", 'y'); } @@ -120,7 +116,7 @@ class EventsDatabase $url = Nuh::$options['base_url']."api/v1/event/$event_id/odds/1/all"; - $rand = rand(500000, 1000000); + $rand = self::rand($langsam); if ($debug) { Notice::note("Sleep $rand msec", 'y'); } @@ -136,4 +132,14 @@ class EventsDatabase } } } + + public static function rand(bool $langsam = false) + { + if($langsam){ + return rand(500000, 50000000); + } + else { + return rand(500000, 1000000); + } + } } diff --git a/app/Console/Commands/Grapper/Sofascore/Helper.php b/app/Console/Commands/Grapper/Sofascore/Helper.php deleted file mode 100644 index 4ada9707..00000000 --- a/app/Console/Commands/Grapper/Sofascore/Helper.php +++ /dev/null @@ -1,8 +0,0 @@ -table('sofa_score_tournaments')->where('enabled', 1)->pluck('id'); + + SofaScoreTournament::query()->update(['enabled' => 0]); + + foreach ($tornaments as $tornament_id) { + SofaScoreTournament::where('id', $tornament_id)->update(['enabled' => 1]); + } + } +} diff --git a/app/Console/Commands/Grapper/Sofascore/Specials/CountPlayerPerSeason.php b/app/Console/Commands/Grapper/Sofascore/Specials/PlayerPerSeason.php similarity index 98% rename from app/Console/Commands/Grapper/Sofascore/Specials/CountPlayerPerSeason.php rename to app/Console/Commands/Grapper/Sofascore/Specials/PlayerPerSeason.php index 26b39adf..f9d7d973 100644 --- a/app/Console/Commands/Grapper/Sofascore/Specials/CountPlayerPerSeason.php +++ b/app/Console/Commands/Grapper/Sofascore/Specials/PlayerPerSeason.php @@ -6,7 +6,7 @@ use App\Models\SofaScorePlayerPerSeason; use App\Models\StatistikoDetail; use App\Models\StatistikoPlayer; -class CountPlayerPerSeason +class PlayerPerSeason { public static function run() { diff --git a/app/Console/Commands/Grapper/Sofascore/Specials/SendMail.php b/app/Console/Commands/Grapper/Sofascore/Specials/SendMail.php new file mode 100644 index 00000000..3e1694c0 --- /dev/null +++ b/app/Console/Commands/Grapper/Sofascore/Specials/SendMail.php @@ -0,0 +1,34 @@ +to("hermann.telser@gmail.com", "sofa archive ".$day) + ->cc("ubaldo.perrucci@gmail.com", "sofa archive ".$day) + ->subject("sofa archive $day") + ->attach($zip_file, [ + 'mime' => 'application/x-zip-compressed', + 'as' => 'sofa archive '.$day.'.zip' + ]); + }); + } + + Notice::note('Mail send', 'g'); + } +} diff --git a/app/Console/Commands/Grapper/Sofascore/Tools/LoadDays.php b/app/Console/Commands/Grapper/Sofascore/Tools/LoadDays.php new file mode 100644 index 00000000..61f475fe --- /dev/null +++ b/app/Console/Commands/Grapper/Sofascore/Tools/LoadDays.php @@ -0,0 +1,40 @@ +format('Y-m-d'); + } + else if($yesterday){ + $days[] = Carbon::now()->subDay()->format('Y-m-d'); + } + else { + $days = SofaScoreDay::where('sport_id', $sport_id)->where('enabled', 1)->pluck('day')->toArray(); + } + + if (! $days) { + Notice::note(__file__.PHP_EOL.'no days', 'r', 1); + } + + return $days; + } +} diff --git a/app/Console/Commands/Grapper/Sofascore/Tools/LoadTournaments.php b/app/Console/Commands/Grapper/Sofascore/Tools/LoadTournaments.php new file mode 100644 index 00000000..0ecf5d7a --- /dev/null +++ b/app/Console/Commands/Grapper/Sofascore/Tools/LoadTournaments.php @@ -0,0 +1,37 @@ +whereIn('tournament_id', explode(",", $grps))->where('enabled', 1)->get(); + } + else{ + $tornaments = SofaScoreTournament::select('name', 'tournament_id')->where('sport_id', $sport_id)->where('enabled', 1)->get(); + } + + if (! $tornaments) { + Notice::note(__file__.PHP_EOL.'no tornaments', 'r', 1); + } + + return $tornaments; + } +} diff --git a/app/Console/Commands/Nuh.php b/app/Console/Commands/Nuh.php index cd888b68..140b919d 100644 --- a/app/Console/Commands/Nuh.php +++ b/app/Console/Commands/Nuh.php @@ -23,7 +23,7 @@ class Nuh extends Command public static $id = 0; - protected $signature = 'nuh {process=help} {--truncate} {--groups=0} {--days=0} {--day=0} {--id=0} {--special=0} {--fn=} {--gid=} {--p} {--d} {--x} {--t} {--w} {--a} {--r} {--s} {--g} {--t} {--q} {--f} {--b} {--e} {--z}'; + protected $signature = 'nuh {process=help} {--truncate} {--grps=0} {--days=0} {--day=0} {--id=0} {--prc=0} {--fn=} {--gid=} {--p} {--d} {--x} {--t} {--y} {--m} {--l} {--w} {--a} {--r} {--s} {--g} {--t} {--q} {--f} {--b} {--e} {--z}'; public function handle() { @@ -49,27 +49,29 @@ class Nuh extends Command $txt .= '-----------------------------------------------------------' . PHP_EOL; $txt .= '--day (optional) grap day format "Y-m-d" or --t for today' . PHP_EOL; $txt .= '--days (optional) grap days back from yesterday' . PHP_EOL; - $txt .= '--groups (optional) csv of tournament_id\'s' . PHP_EOL; + $txt .= '--grps (optional) csv of tournament_id\'s' . PHP_EOL; + $txt .= '--l langsam: calls between 0.5 an 10 sec' . PHP_EOL; $txt .= '--p will print days and tournaments and stop' . PHP_EOL; - $txt .= '--special (generate data) [1 => count played/season]' . PHP_EOL; + $txt .= '--prc (generate data) [1 => count played/season, 2=>Tournamet to local]' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL; $txt .= 'Options' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL; - $txt .= '--t load today' . PHP_EOL; - $txt .= '--p use proxy' . PHP_EOL; - $txt .= '--d debug' . PHP_EOL; - $txt .= '--f run also when odd' . PHP_EOL; - $txt .= '--x generate supervisors' . PHP_EOL; - $txt .= '--t load today' . PHP_EOL; $txt .= '--a all by id' . PHP_EOL; $txt .= '--b block update (reload all for txodds)' . PHP_EOL; - $txt .= '--w laod this week (tx)' . PHP_EOL; + $txt .= '--d debug' . PHP_EOL; + $txt .= '--e echo client data' . PHP_EOL; + $txt .= '--f force (whatever in script)' . PHP_EOL; $txt .= '--g by minor groups (tx)' . PHP_EOL; + $txt .= '--t load today' . PHP_EOL; + $txt .= '--m mail it' . PHP_EOL; + $txt .= '--p use proxy' . PHP_EOL; + $txt .= '--q print all queries' . PHP_EOL; $txt .= '--r read data from file ' . PHP_EOL; $txt .= '--s store data to file ' . PHP_EOL; - $txt .= '--f force update market' . PHP_EOL; - $txt .= '--q print all queries' . PHP_EOL; - $txt .= '--e echo client data' . PHP_EOL; + $txt .= '--t load today' . PHP_EOL; + $txt .= '--w laod this week (tx)' . PHP_EOL; + $txt .= '--x generate supervisors' . PHP_EOL; + $txt .= '--y load yesterday' . PHP_EOL; $txt .= '--z show supervisors tasks' . PHP_EOL; } diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index 99204f0d..b38040fc 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -3,8 +3,6 @@ namespace App\Filament\Widgets\Data; use App\Filament\Widgets\Data\LoadEvents\LoadEventsAverages; -use App\Models\SofaScoreEvent; -use App\Models\SofaScorePlayerPerSeason; use App\Models\StatisticFixtures; use App\Models\StatistikoDetail; use App\Models\StatistikoEvent; diff --git a/app/Models/Supervisor.php b/app/Models/Supervisor.php index 67e4b896..00028d89 100644 --- a/app/Models/Supervisor.php +++ b/app/Models/Supervisor.php @@ -10,6 +10,7 @@ class Supervisor extends Model 'name', 'provider_id', 'sport_id', + 'special_id', 'txodds_market_id', 'sleep', 'limit', diff --git a/app/Utilities/ZipFolder.php b/app/Utilities/ZipFolder.php new file mode 100644 index 00000000..2413e9ed --- /dev/null +++ b/app/Utilities/ZipFolder.php @@ -0,0 +1,51 @@ +open($zipFilePath, ZipArchive::CREATE | ZipArchive::OVERWRITE) === true) { + + $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(Special::$source_path)); + + foreach ($files as $file) { + if (!$file->isDir()) { + $filePath = $file->getRealPath(); + $relativePath = substr($filePath, strlen(Special::$source_path) + 1); + $zip->addFile($filePath, $relativePath); + } + } + $zip->close(); + } else { + return response()->json(['error' => 'Failed to create ZIP archive'], 500); + } + } + + public static function get_tree(string $dir, &$results = array()){ + $files = scandir($dir); + foreach($files as $value){ + $path = realpath($dir.DIRECTORY_SEPARATOR.$value); + if(!is_dir($path)) { + $results[] = $path; + } else if($value != "." && $value != "..") { + self::get_tree($path, $results); + $results[] = $path; + } + } + + return $results; + } +} diff --git a/composer.lock b/composer.lock index 241093cb..f5fbcb6f 100644 --- a/composer.lock +++ b/composer.lock @@ -3107,16 +3107,16 @@ }, { "name": "laravel/prompts", - "version": "v0.3.20", + "version": "v0.3.21", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "6d53c826dfd33ec5f4ac91f816ff327727c7988b" + "reference": "7753c65c281c2550c7c183f14e18062073b7d821" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/6d53c826dfd33ec5f4ac91f816ff327727c7988b", - "reference": "6d53c826dfd33ec5f4ac91f816ff327727c7988b", + "url": "https://api.github.com/repos/laravel/prompts/zipball/7753c65c281c2550c7c183f14e18062073b7d821", + "reference": "7753c65c281c2550c7c183f14e18062073b7d821", "shasum": "" }, "require": { @@ -3160,9 +3160,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.3.20" + "source": "https://github.com/laravel/prompts/tree/v0.3.21" }, - "time": "2026-06-24T19:16:38+00:00" + "time": "2026-06-26T00:11:25+00:00" }, { "name": "laravel/serializable-closure", @@ -4030,16 +4030,16 @@ }, { "name": "livewire/livewire", - "version": "v4.3.1", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "6a9dd03f45a4b200abfd0ff644745b23fa7baaaa" + "reference": "8021f2561865c4c297a3bfca37212a99034377e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/6a9dd03f45a4b200abfd0ff644745b23fa7baaaa", - "reference": "6a9dd03f45a4b200abfd0ff644745b23fa7baaaa", + "url": "https://api.github.com/repos/livewire/livewire/zipball/8021f2561865c4c297a3bfca37212a99034377e7", + "reference": "8021f2561865c4c297a3bfca37212a99034377e7", "shasum": "" }, "require": { @@ -4094,7 +4094,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v4.3.1" + "source": "https://github.com/livewire/livewire/tree/v4.3.3" }, "funding": [ { @@ -4102,7 +4102,7 @@ "type": "github" } ], - "time": "2026-06-02T08:58:52+00:00" + "time": "2026-06-27T03:16:11+00:00" }, { "name": "masterminds/html5", @@ -6945,16 +6945,16 @@ }, { "name": "symfony/console", - "version": "v7.4.13", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "85095d2573eaefaf35e40b9513a9bf09f72cd217" + "reference": "92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/85095d2573eaefaf35e40b9513a9bf09f72cd217", - "reference": "85095d2573eaefaf35e40b9513a9bf09f72cd217", + "url": "https://api.github.com/repos/symfony/console/zipball/92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87", + "reference": "92f58bc4bf97a92ed1b9f367f0cd44f20bde0e87", "shasum": "" }, "require": { @@ -7019,7 +7019,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.13" + "source": "https://github.com/symfony/console/tree/v7.4.14" }, "funding": [ { @@ -7039,7 +7039,7 @@ "type": "tidelift" } ], - "time": "2026-05-24T08:56:14+00:00" + "time": "2026-06-16T11:50:14+00:00" }, { "name": "symfony/css-selector", @@ -7112,16 +7112,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", - "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d", "shasum": "" }, "require": { @@ -7159,7 +7159,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1" }, "funding": [ { @@ -7179,20 +7179,20 @@ "type": "tidelift" } ], - "time": "2026-04-13T15:52:40+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/error-handler", - "version": "v7.4.8", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa" + "reference": "4e1a093b481f323e6e326451f9760c3868430673" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa", - "reference": "8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/4e1a093b481f323e6e326451f9760c3868430673", + "reference": "4e1a093b481f323e6e326451f9760c3868430673", "shasum": "" }, "require": { @@ -7241,7 +7241,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.4.8" + "source": "https://github.com/symfony/error-handler/tree/v7.4.14" }, "funding": [ { @@ -7261,20 +7261,20 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-06-05T06:22:21+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.4.9", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "e4a2e29753c7801f7a8340e066cfa788f3bc8101" + "reference": "51fe3d170227be8d1772214b82ae506e15ed78ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e4a2e29753c7801f7a8340e066cfa788f3bc8101", - "reference": "e4a2e29753c7801f7a8340e066cfa788f3bc8101", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/51fe3d170227be8d1772214b82ae506e15ed78ff", + "reference": "51fe3d170227be8d1772214b82ae506e15ed78ff", "shasum": "" }, "require": { @@ -7326,7 +7326,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.14" }, "funding": [ { @@ -7346,20 +7346,20 @@ "type": "tidelift" } ], - "time": "2026-04-18T13:18:21+00:00" + "time": "2026-06-06T11:10:32+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", - "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c7de7a00ffb67842132da02ea92988a39ccd9f4e", + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e", "shasum": "" }, "require": { @@ -7406,7 +7406,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.1" }, "funding": [ { @@ -7426,20 +7426,20 @@ "type": "tidelift" } ], - "time": "2026-01-05T13:30:16+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/finder", - "version": "v7.4.8", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "e0be088d22278583a82da281886e8c3592fbf149" + "reference": "13b38720174286f55d1761152b575a8d1436fc25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/e0be088d22278583a82da281886e8c3592fbf149", - "reference": "e0be088d22278583a82da281886e8c3592fbf149", + "url": "https://api.github.com/repos/symfony/finder/zipball/13b38720174286f55d1761152b575a8d1436fc25", + "reference": "13b38720174286f55d1761152b575a8d1436fc25", "shasum": "" }, "require": { @@ -7474,7 +7474,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.8" + "source": "https://github.com/symfony/finder/tree/v7.4.14" }, "funding": [ { @@ -7494,20 +7494,20 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-06-27T08:31:18+00:00" }, { "name": "symfony/html-sanitizer", - "version": "v7.4.13", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/html-sanitizer.git", - "reference": "761f6c49dfd103ee08b3cd09ece588b069e18ec9" + "reference": "c328df69f5b6f44a0d031d757903d955bebb23b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/761f6c49dfd103ee08b3cd09ece588b069e18ec9", - "reference": "761f6c49dfd103ee08b3cd09ece588b069e18ec9", + "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/c328df69f5b6f44a0d031d757903d955bebb23b3", + "reference": "c328df69f5b6f44a0d031d757903d955bebb23b3", "shasum": "" }, "require": { @@ -7548,7 +7548,7 @@ "sanitizer" ], "support": { - "source": "https://github.com/symfony/html-sanitizer/tree/v7.4.13" + "source": "https://github.com/symfony/html-sanitizer/tree/v7.4.14" }, "funding": [ { @@ -7568,20 +7568,20 @@ "type": "tidelift" } ], - "time": "2026-05-24T11:20:33+00:00" + "time": "2026-06-06T11:10:32+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.4.13", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "bc354f47c62301e990b7874fa662326368508e2c" + "reference": "06db5ae1552177bf8572f8908839f12e3c06aed3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/bc354f47c62301e990b7874fa662326368508e2c", - "reference": "bc354f47c62301e990b7874fa662326368508e2c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/06db5ae1552177bf8572f8908839f12e3c06aed3", + "reference": "06db5ae1552177bf8572f8908839f12e3c06aed3", "shasum": "" }, "require": { @@ -7630,7 +7630,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.4.13" + "source": "https://github.com/symfony/http-foundation/tree/v7.4.14" }, "funding": [ { @@ -7650,20 +7650,20 @@ "type": "tidelift" } ], - "time": "2026-05-24T11:20:33+00:00" + "time": "2026-06-11T07:31:44+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.4.13", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "9df847980c436451f4f51d1284491bb4356dd989" + "reference": "e99af79b1e776646eda0e1c23b7b45c184ff99be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9df847980c436451f4f51d1284491bb4356dd989", - "reference": "9df847980c436451f4f51d1284491bb4356dd989", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e99af79b1e776646eda0e1c23b7b45c184ff99be", + "reference": "e99af79b1e776646eda0e1c23b7b45c184ff99be", "shasum": "" }, "require": { @@ -7749,7 +7749,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.4.13" + "source": "https://github.com/symfony/http-kernel/tree/v7.4.14" }, "funding": [ { @@ -7769,20 +7769,20 @@ "type": "tidelift" } ], - "time": "2026-05-27T08:31:43+00:00" + "time": "2026-06-27T09:14:35+00:00" }, { "name": "symfony/mailer", - "version": "v7.4.12", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "5cefb712a25f320579615ba9e1942abaeade7dff" + "reference": "f88ce03ae73e3edb5c176ce1f337709996e88495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/5cefb712a25f320579615ba9e1942abaeade7dff", - "reference": "5cefb712a25f320579615ba9e1942abaeade7dff", + "url": "https://api.github.com/repos/symfony/mailer/zipball/f88ce03ae73e3edb5c176ce1f337709996e88495", + "reference": "f88ce03ae73e3edb5c176ce1f337709996e88495", "shasum": "" }, "require": { @@ -7833,7 +7833,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.4.12" + "source": "https://github.com/symfony/mailer/tree/v7.4.14" }, "funding": [ { @@ -7853,7 +7853,7 @@ "type": "tidelift" } ], - "time": "2026-05-20T07:20:23+00:00" + "time": "2026-06-13T08:51:35+00:00" }, { "name": "symfony/mime", @@ -8925,16 +8925,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", - "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", "shasum": "" }, "require": { @@ -8988,7 +8988,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" }, "funding": [ { @@ -9008,7 +9008,7 @@ "type": "tidelift" } ], - "time": "2026-03-28T09:44:51+00:00" + "time": "2026-06-16T09:55:08+00:00" }, { "name": "symfony/string", @@ -9103,16 +9103,16 @@ }, { "name": "symfony/translation", - "version": "v7.4.10", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "ada7578c30dd5feaa8259cff3e885069ea81ddde" + "reference": "a1af4dacb24eb7ef4f1ca71b94da8ddbce572281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ada7578c30dd5feaa8259cff3e885069ea81ddde", - "reference": "ada7578c30dd5feaa8259cff3e885069ea81ddde", + "url": "https://api.github.com/repos/symfony/translation/zipball/a1af4dacb24eb7ef4f1ca71b94da8ddbce572281", + "reference": "a1af4dacb24eb7ef4f1ca71b94da8ddbce572281", "shasum": "" }, "require": { @@ -9179,7 +9179,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.4.10" + "source": "https://github.com/symfony/translation/tree/v7.4.14" }, "funding": [ { @@ -9199,20 +9199,20 @@ "type": "tidelift" } ], - "time": "2026-05-06T11:19:24+00:00" + "time": "2026-06-06T09:33:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.7.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d" + "reference": "ccb206b98faccc511ebae8e5fad50f2dc0b30621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/0ab302977a952b42fd51475c4ebac81f8da0a95d", - "reference": "0ab302977a952b42fd51475c4ebac81f8da0a95d", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/ccb206b98faccc511ebae8e5fad50f2dc0b30621", + "reference": "ccb206b98faccc511ebae8e5fad50f2dc0b30621", "shasum": "" }, "require": { @@ -9261,7 +9261,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.7.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.7.1" }, "funding": [ { @@ -9281,7 +9281,7 @@ "type": "tidelift" } ], - "time": "2026-01-05T13:30:16+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/uid", @@ -9363,16 +9363,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.4.8", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd" + "reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9510c3966f749a1d1ff0059e1eabef6cc621e7fd", - "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358", + "reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358", "shasum": "" }, "require": { @@ -9426,7 +9426,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.4.8" + "source": "https://github.com/symfony/var-dumper/tree/v7.4.14" }, "funding": [ { @@ -9446,7 +9446,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T13:44:50+00:00" + "time": "2026-06-08T20:24:16+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -13295,16 +13295,16 @@ }, { "name": "symfony/yaml", - "version": "v7.4.13", + "version": "v7.4.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a7ec3b1156faf8815db7683ec7c1e7338e6f977c" + "reference": "f8f328665ace2370d1e10645b807ba1646dc7dcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a7ec3b1156faf8815db7683ec7c1e7338e6f977c", - "reference": "a7ec3b1156faf8815db7683ec7c1e7338e6f977c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f8f328665ace2370d1e10645b807ba1646dc7dcc", + "reference": "f8f328665ace2370d1e10645b807ba1646dc7dcc", "shasum": "" }, "require": { @@ -13347,7 +13347,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.13" + "source": "https://github.com/symfony/yaml/tree/v7.4.14" }, "funding": [ { @@ -13367,7 +13367,7 @@ "type": "tidelift" } ], - "time": "2026-05-25T06:06:12+00:00" + "time": "2026-06-08T20:24:16+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", diff --git a/config/database.php b/config/database.php index b0d55e29..0d756a88 100644 --- a/config/database.php +++ b/config/database.php @@ -79,6 +79,22 @@ return [ 'strict' => false, 'engine' => null, ], + 'remote_mariadb' => [ + 'driver' => 'mariadb', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => '13306', + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), + 'timezone' => '+01:00', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => false, + 'engine' => null, + ], 'mongodb' => [ 'driver' => 'mongodb', diff --git a/database/migrations/2023_08_06_085243_create_supervisor_table.php b/database/migrations/2023_08_06_085243_create_supervisor_table.php index 7cf0d53b..90ca5552 100644 --- a/database/migrations/2023_08_06_085243_create_supervisor_table.php +++ b/database/migrations/2023_08_06_085243_create_supervisor_table.php @@ -16,6 +16,7 @@ return new class extends Migration $table->string('name'); $table->integer('provider_id')->default(0)->nullable()->references('id')->on('providers'); $table->integer('sport_id')->references('id')->on('sports')->nullable(); + $table->integer('special_id')->nullable()->default(0); $table->integer('txodds_market_id')->references('market_id')->on('txodds_market')->nullable(); $table->integer('sleep')->default(30); diff --git a/setup.sh b/setup.sh index aa7cc2e4..8a4addfe 100755 --- a/setup.sh +++ b/setup.sh @@ -110,44 +110,72 @@ case "$1" in # php artisan nuh --d --f --p 19 ;; - "11") - echo "" - echo "" - echo "!! NO PROXY !!" - echo "!! NO DATE LIMIT !!" - echo "" - echo "" - php artisan nuh --d --f --w 1 - php artisan nuh --d --f --w 2 - php artisan nuh --d --f --w 20 - php artisan nuh --d --f --w 21 - php artisan nuh --d --f --w 22 - php artisan nuh --d --f --w 3 - php artisan nuh --d --f --w 4 - php artisan nuh --d --f --w 5 - php artisan nuh --d --f --w 6 - php artisan nuh --d --f 8 - php artisan nuh --d --f 9 - php artisan nuh --d --f 10 - php artisan nuh --d --f 11 - php artisan nuh --d --f 12 - php artisan nuh --d --f 13 - php artisan nuh --d --f 14 - php artisan nuh --d --f 15 - php artisan nuh --d --f 16 - php artisan nuh --d --f 17 - php artisan nuh --d --f 18 - php artisan nuh --d --f 19 - ;; +"11") + echo "" + echo "" + echo "!! NO PROXY !!" + echo "!! NO DATE LIMIT !!" + echo "" + echo "" + php artisan nuh --d --f --w 1 + php artisan nuh --d --f --w 2 + php artisan nuh --d --f --w 20 + php artisan nuh --d --f --w 21 + php artisan nuh --d --f --w 22 + php artisan nuh --d --f --w 3 + php artisan nuh --d --f --w 4 + php artisan nuh --d --f --w 5 + php artisan nuh --d --f --w 6 + php artisan nuh --d --f 8 + php artisan nuh --d --f 9 + php artisan nuh --d --f 10 + php artisan nuh --d --f 11 + php artisan nuh --d --f 12 + php artisan nuh --d --f 13 + php artisan nuh --d --f 14 + php artisan nuh --d --f 15 + php artisan nuh --d --f 16 + php artisan nuh --d --f 17 + php artisan nuh --d --f 18 + php artisan nuh --d --f 19 +;; + +"12") + echo "" + echo "clear queue and restart" + echo "" + php artisan queue:clear + php artisan queue:restart + php artisan optimize +;; + +"13") + ## AUTO GRAPPER SOFASCORE + # -i ~/.ssh/id_rsa + echo "\n⚽ close all open vpn" + killall ssh + + echo "\n⚽ open vpn tunnel to prod" + ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190 + + echo "\n⚽ copy active tournaments" + php artisan nuh --d --f 73 --prc=2 + + echo "\n⚽ close tunnel" + killall ssh + + echo "\n⚽ grapp data sofascore" + # php artisan nuh --d --f --y 72 + + echo "\n⚽ create zip archive" + php artisan nuh --d --f --y 73 --prc=3 + + echo "\n⚽ mail archive" + php artisan nuh --d --f --y 73 --prc=4 + + echo "\n😎 done :)" +;; - "12") - echo "" - echo "clear queue and restart" - echo "" - php artisan queue:clear - php artisan queue:restart - php artisan optimize - ;; *) echo "" echo "--------------------------" @@ -165,6 +193,7 @@ case "$1" in echo "10 => a load today soccer, WITH proxy" echo "11 => a load all sport no date limit, NO proxy" echo "12 => clear queue and restart" + echo "13 => a) open vpn tunnel\n b) copy tournaments to local\n e) close vpn tunnel\n d) grap sofascore\n e) create zip archive\n f) mail zip archive" echo "--------------------------" echo "" ;;