mirror of
https://github.com/migatu/astrololo.git
synced 2026-07-14 13:34:38 +00:00
f6323cac10
Punktacja siły (LOG-21): - scoring.py: siła fasety z sygnałów obliczalnych (typ fasety, rodzaj aspektu, ciasnota orbu). Konfigurowalne wagi. Hook na przyszłość: kolumny countas*/level* z SIGNIFICATORS KEY (obecnie puste). - aspekty niosą orb+allowed; fasety dostają "score"; ranking faset malejąco. Grupowanie: - opcja group: zwija próbki po opisie (ten sam efekt = jedna grupa z listą sygnifikatorów i licznikiem). Checkbox "grupuj identyczne opisy" w /interpret. Geolokalizacja (bajer): - "Tu i teraz" (widok Horoskop i Interpretacje) uzupełnia lat/lon z przeglądarki (navigator.geolocation; wymaga zgody, https/localhost). Zweryfikowano na realnym main_base.xlsx: ranking sensowny (ciasna opozycja z Saturn 9.59 > szeroka koniunkcja z Moon 6.25 > znak/dom 5.0); grupowanie zwija powtórzone opisy. 41 testów przechodzi. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
132 lines
4.7 KiB
HTML
132 lines
4.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Horoskop{% endblock %}
|
|
{% block nav_chart %}active{% endblock %}
|
|
|
|
{% block content %}
|
|
<p class="sub">Wpisz dane momentu i miejsca — program policzy pozycje obiektów, osie i domy (silnik efemeryd warstwy logicznej).</p>
|
|
|
|
<form method="post" action="/">
|
|
<div class="grid">
|
|
<label>Data
|
|
<input type="date" name="date" value="{{ form.date or '' }}" required>
|
|
</label>
|
|
<label>Godzina (lokalna)
|
|
<input type="time" name="time" value="{{ form.time or '' }}" required>
|
|
</label>
|
|
<label>Strefa (offset h)
|
|
<input type="number" name="tz_offset" step="0.25" value="{{ form.tz_offset if form.tz_offset is not none else 0 }}">
|
|
</label>
|
|
</div>
|
|
<div class="grid">
|
|
<label>Szerokość (lat, + N)
|
|
<input type="number" name="lat" step="0.0001" value="{{ form.lat if form.lat is not none else 0 }}">
|
|
</label>
|
|
<label>Długość (lon, + E)
|
|
<input type="number" name="lon" step="0.0001" value="{{ form.lon if form.lon is not none else 0 }}">
|
|
</label>
|
|
<label>System domów
|
|
<select name="house_system">
|
|
{% set hs = form.house_system or 'whole_sign' %}
|
|
<option value="whole_sign" {{ 'selected' if hs == 'whole_sign' else '' }}>Whole Sign</option>
|
|
<option value="equal" {{ 'selected' if hs == 'equal' else '' }}>Equal</option>
|
|
<option value="porphyry" {{ 'selected' if hs == 'porphyry' else '' }}>Porphyry</option>
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="button" id="nowBtn" class="ghost">Tu i teraz</button>
|
|
<button type="submit">Policz horoskop</button>
|
|
</div>
|
|
</form>
|
|
|
|
{% if error %}
|
|
<div class="error">{{ error }}</div>
|
|
{% endif %}
|
|
|
|
{% if result %}
|
|
<div class="meta">
|
|
Silnik: <strong>{{ result.engine }}</strong> ·
|
|
obiektów: {{ result.positions | length }}
|
|
{% if result.house_system %}· domy: {{ result.house_system }}{% endif %}
|
|
{% if moment %}· moment: {{ moment }}{% endif %}
|
|
</div>
|
|
|
|
{% if result.angles %}
|
|
<table class="angles">
|
|
<thead><tr><th>Oś</th><th>Znak</th><th>W znaku</th></tr></thead>
|
|
<tbody>
|
|
{% for key in ["Asc", "MC", "Dsc", "IC"] %}
|
|
{% set a = result.angles[key] %}
|
|
<tr><td>{{ a.name }}</td><td>{{ a.sign }}</td><td class="mono">{{ a.in_sign }}</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Obiekt</th><th>Znak</th><th>W znaku</th><th>Dom</th><th>Kier.</th><th>Prędkość °/d</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for p in result.positions %}
|
|
<tr>
|
|
<td>{{ p.name }}</td>
|
|
<td>{{ p.sign }}</td>
|
|
<td class="mono">{{ p.in_sign }}</td>
|
|
<td>{{ p.house if p.house is defined else '—' }}</td>
|
|
<td class="{{ 'retro' if p.direction == 'Rx' else '' }}">{{ p.direction }}</td>
|
|
<td class="mono">{{ '%+.4f' | format(p.speed) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if result.aspects %}
|
|
<div class="meta">Aspekty główne ({{ result.aspects | length }})</div>
|
|
<table class="angles">
|
|
<thead><tr><th>Obiekt 1</th><th>Aspekt</th><th>Obiekt 2</th><th>Orb</th></tr></thead>
|
|
<tbody>
|
|
{% for a in result.aspects %}
|
|
<tr><td>{{ a.obj1 }}</td><td>{{ a.aspect }}</td><td>{{ a.obj2 }}</td><td class="mono">{{ '%.2f'|format(a.orb) }}°</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if result.cusps %}
|
|
<details class="loc">
|
|
<summary>Cusps domów ({{ result.house_system }})</summary>
|
|
<table>
|
|
<thead><tr><th>Dom</th><th>Znak</th><th>Cusp</th></tr></thead>
|
|
<tbody>
|
|
{% for c in result.cusps %}
|
|
<tr><td>{{ c.house }}</td><td>{{ c.sign }}</td><td class="mono">{{ c.in_sign }}</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</details>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<script>
|
|
// „Tu i teraz": uzupełnia datę/godzinę bieżącą i offset lokalny przeglądarki.
|
|
document.getElementById('nowBtn').addEventListener('click', function () {
|
|
const d = new Date();
|
|
const pad = n => String(n).padStart(2, '0');
|
|
document.querySelector('input[name=date]').value =
|
|
d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate());
|
|
document.querySelector('input[name=time]').value = pad(d.getHours()) + ':' + pad(d.getMinutes());
|
|
document.querySelector('input[name=tz_offset]').value = (-d.getTimezoneOffset() / 60);
|
|
// bajer: lokalizacja z przeglądarki (wymaga zgody; działa na https/localhost)
|
|
if (navigator.geolocation) {
|
|
navigator.geolocation.getCurrentPosition(function (pos) {
|
|
document.querySelector('input[name=lat]').value = pos.coords.latitude.toFixed(4);
|
|
document.querySelector('input[name=lon]').value = pos.coords.longitude.toFixed(4);
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|