mirror of
https://github.com/migatu/astrololo.git
synced 2026-07-14 21:38:37 +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>
103 lines
4.1 KiB
HTML
103 lines
4.1 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Interpretacje{% endblock %}
|
||
{% block nav_interp %}active{% endblock %}
|
||
|
||
{% block content %}
|
||
<p class="sub">Program policzy horoskop i wyszuka w bazie interpretacje pasujące do obliczeń (pierwsza wersja: planeta w swoim znaku).</p>
|
||
|
||
<form method="post" action="/interpret">
|
||
<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>
|
||
<label>Szerokość (lat)
|
||
<input type="number" name="lat" step="0.0001" value="{{ form.lat if form.lat is not none else 0 }}">
|
||
</label>
|
||
<label>Długość (lon)
|
||
<input type="number" name="lon" step="0.0001" value="{{ form.lon if form.lon is not none else 0 }}">
|
||
</label>
|
||
</div>
|
||
<div class="opts">
|
||
<label><input type="checkbox" name="group" value="true" {{ 'checked' if form.group else '' }}> grupuj identyczne opisy</label>
|
||
</div>
|
||
<div class="actions">
|
||
<button type="button" id="nowBtn" class="ghost">Tu i teraz</button>
|
||
<button type="submit">Szukaj interpretacji</button>
|
||
</div>
|
||
</form>
|
||
|
||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||
|
||
{% if result %}
|
||
{% if result.data_error %}
|
||
<div class="error">{{ result.data_error }}</div>
|
||
{% endif %}
|
||
<div class="meta">
|
||
Silnik: <strong>{{ result.engine }}</strong>
|
||
{% if result.provider %}· baza: {{ result.provider }}{% endif %}
|
||
{% if moment %}· moment: {{ moment }}{% endif %}
|
||
</div>
|
||
|
||
{% for o in result.objects %}
|
||
<div class="sig-item">
|
||
<div class="sig-head">
|
||
<strong>{{ o.object }}</strong> w <strong>{{ o.sign }}</strong>{% if o.house %}, {{ o.house }}. dom{% endif %}
|
||
<span class="{{ 'retro' if o.direction == 'Rx' else '' }}">{{ o.direction }}</span>
|
||
<span class="muted small">(planeta {{ o.planet_token }}: {{ o.planet_total }} rekordów)</span>
|
||
</div>
|
||
{% for f in o.facets %}
|
||
<div class="facet">
|
||
<div class="facet-head">{{ f.label }} — <strong>{{ f.count }}</strong> dopasowań
|
||
<span class="badge" title="siła (LOG-21)">siła {{ f.score }}</span>
|
||
<span class="muted small">[{{ f.token }}]</span></div>
|
||
{% if f.groups %}
|
||
<table class="samples">
|
||
<tbody>
|
||
{% for g in f.groups %}
|
||
<tr>
|
||
<td>{{ g.effect }}{% if g.count > 1 %} <span class="badge">×{{ g.count }}</span>{% endif %}</td>
|
||
<td class="sig small">{{ g.significators | join('; ') }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{% elif f.samples %}
|
||
<table class="samples">
|
||
<tbody>
|
||
{% for s in f.samples %}
|
||
<tr><td class="sig nowrap" title="{{ s.significator }}">{{ s.expanded }}</td><td>{{ s.effect }}</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{% endif %}
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% endfor %}
|
||
{% endif %}
|
||
|
||
<script>
|
||
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 %}
|