Goldener Henkel ist drin
This commit is contained in:
@@ -57,6 +57,7 @@ $messierData = [];
|
||||
$planetData = [];
|
||||
$moonData = null;
|
||||
$moonPhaseEvents = [];
|
||||
$goldenHandleEvents = [];
|
||||
$moonPlanetApproaches = [];
|
||||
$planetConjunctions = [];
|
||||
$eclipseEvents = [];
|
||||
@@ -337,6 +338,23 @@ if (is_array($moonPhaseDecoded) && ($moonPhaseDecoded['ok'] ?? false)) {
|
||||
$moonPhaseEvents = is_array($moonPhaseDecoded['phases'] ?? null) ? $moonPhaseDecoded['phases'] : [];
|
||||
}
|
||||
|
||||
$goldenHandleOutput = [];
|
||||
$goldenHandleExitCode = 0;
|
||||
$goldenHandleArgs = [
|
||||
$pythonScriptPath,
|
||||
'golden_handle_for_month',
|
||||
(string) $selectedYear,
|
||||
(string) $selectedMonth,
|
||||
$chartTimezone,
|
||||
];
|
||||
$goldenHandleCommand = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', $goldenHandleArgs)) . ' 2>&1';
|
||||
exec($goldenHandleCommand, $goldenHandleOutput, $goldenHandleExitCode);
|
||||
$goldenHandleRaw = trim(implode("\n", $goldenHandleOutput));
|
||||
$goldenHandleDecoded = json_decode($goldenHandleRaw, true);
|
||||
if (is_array($goldenHandleDecoded) && ($goldenHandleDecoded['ok'] ?? false)) {
|
||||
$goldenHandleEvents = is_array($goldenHandleDecoded['events'] ?? null) ? $goldenHandleDecoded['events'] : [];
|
||||
}
|
||||
|
||||
$seasonOutput = [];
|
||||
$seasonExitCode = 0;
|
||||
$seasonArgs = [
|
||||
@@ -597,6 +615,24 @@ foreach ($moonPhaseEvents as $phaseEvent) {
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($goldenHandleEvents as $goldenHandleEvent) {
|
||||
if (!is_array($goldenHandleEvent)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$peakDate = (string) ($goldenHandleEvent['peak_local_date'] ?? '');
|
||||
$peakTime = (string) ($goldenHandleEvent['peak_local_time'] ?? '');
|
||||
$goldenHandleLabel = 'Goldener Henkel am Mond';
|
||||
|
||||
$monthEventList[] = [
|
||||
'event' => $goldenHandleLabel,
|
||||
'date' => $peakDate !== '' ? $peakDate : (string) ($goldenHandleEvent['local_date'] ?? ''),
|
||||
'time' => $peakTime !== '' ? $peakTime : (string) ($goldenHandleEvent['local_time'] ?? ''),
|
||||
'local_iso' => (string) ($goldenHandleEvent['peak_local_iso'] ?? $goldenHandleEvent['local_iso'] ?? ''),
|
||||
'type' => 'golden_handle',
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($seasonChanges as $seasonChange) {
|
||||
if (!is_array($seasonChange)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user