Aktualisierung
This commit is contained in:
parent
bebb0a0aa5
commit
47ebaa4fcd
10 changed files with 180 additions and 0 deletions
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
8
.idea/Lotto2PY.iml
generated
Normal file
8
.idea/Lotto2PY.iml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
7
.idea/misc.xml
generated
Normal file
7
.idea/misc.xml
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.9" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Lotto2PY.iml" filepath="$PROJECT_DIR$/.idea/Lotto2PY.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
41
6aus49APP/static/app.js
Normal file
41
6aus49APP/static/app.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
function renderDrawsTable(data) {
|
||||
if (!data || !Array.isArray(data.items)) {
|
||||
return '<p class="muted">Keine Daten</p>';
|
||||
}
|
||||
const rows = data.items.map(d => `
|
||||
<tr>
|
||||
<td class="nowrap"><a href="/api/draw/${d.datum}" target="_blank">${d.datum}</a></td>
|
||||
<td class="numbers">${[d.z1,d.z2,d.z3,d.z4,d.z5,d.z6].map(n => `<span class="badge">${n}</span>`).join(' ')}</td>
|
||||
<td class="nowrap"><strong>${d.sz}</strong></td>
|
||||
</tr>
|
||||
`).join('');
|
||||
return `
|
||||
<p class="muted">Treffer: ${data.total}</p>
|
||||
<table role="grid">
|
||||
<thead>
|
||||
<tr><th>Datum</th><th>Zahlen</th><th>Superzahl</th></tr>
|
||||
</thead>
|
||||
<tbody>${rows}</tbody>
|
||||
</table>`;
|
||||
}
|
||||
|
||||
function renderFrequencyPanels(data) {
|
||||
const z = (data.zahlen || []).map(x => `<tr><td>${x.zahl}</td><td>${x.haeufigkeit}</td></tr>`).join('');
|
||||
const sz = (data.superzahl || []).map(x => `<tr><td>${x.zahl}</td><td>${x.haeufigkeit}</td></tr>`).join('');
|
||||
return `
|
||||
<div>
|
||||
<h3>Häufigkeit Zahlen (1–49)</h3>
|
||||
<table role="grid">
|
||||
<thead><tr><th>Zahl</th><th>Häufigkeit</th></tr></thead>
|
||||
<tbody>${z}</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Häufigkeit Superzahl (0–9)</h3>
|
||||
<table role="grid">
|
||||
<thead><tr><th>Superzahl</th><th>Häufigkeit</th></tr></thead>
|
||||
<tbody>${sz}</tbody>
|
||||
</table>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
56
6aus49APP/templates/index.html.bak
Normal file
56
6aus49APP/templates/index.html.bak
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>6aus49 – Auswertung</title>
|
||||
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
||||
<style>
|
||||
body { max-width: 1100px; margin: auto; }
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: .5rem; }
|
||||
.nowrap { white-space: nowrap; }
|
||||
.numbers span { display:inline-block; min-width: 2.2ch; text-align: center; }
|
||||
.badge { border: 1px solid var(--pico-primary); border-radius: 4px; padding: 0 .3rem; margin: 0 .1rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>6aus49 – Ziehungen</h1>
|
||||
|
||||
<!-- Reduziertes Filterformular -->
|
||||
<form id="filterForm" class="grid"
|
||||
hx-get="/ui/draws"
|
||||
hx-target="#result"
|
||||
hx-trigger="change, submit"
|
||||
hx-include="#filterForm">
|
||||
<label>
|
||||
Von
|
||||
<input type="date" name="date_from">
|
||||
</label>
|
||||
<label>
|
||||
Bis
|
||||
<input type="date" name="date_to">
|
||||
</label>
|
||||
<label>
|
||||
Limit
|
||||
<input type="number" name="limit" min="1" max="500" value="10">
|
||||
</label>
|
||||
<label>
|
||||
Reihenfolge
|
||||
<select name="order">
|
||||
<option value="desc" selected>Neueste zuerst</option>
|
||||
<option value="asc">Älteste zuerst</option>
|
||||
</select>
|
||||
</label>
|
||||
<div style="grid-column: 1 / -1; display:flex; gap:.5rem;">
|
||||
<button type="submit" class="primary">Anzeigen</button>
|
||||
<button type="reset">Zurücksetzen</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Ergebniscontainer: lädt initial -->
|
||||
<div id="result" hx-get="/ui/draws" hx-trigger="load" hx-target="#result">
|
||||
<!-- Tabelle wird hier eingefügt -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
datum.py
Normal file
33
datum.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import pymysql
|
||||
|
||||
# --- Verbindung herstellen ---
|
||||
connection = pymysql.connect(
|
||||
host='10.0.1.123',
|
||||
user='hubobel',
|
||||
password='polier2003',
|
||||
database='hubobel',
|
||||
charset='utf8mb4',
|
||||
cursorclass=pymysql.cursors.Cursor
|
||||
)
|
||||
|
||||
try:
|
||||
with connection.cursor() as cursor:
|
||||
# Beispielwerte
|
||||
z1, z2, z3, z4, z5 = 10, 22, 38, 42, 48
|
||||
|
||||
# --- Prüfabfrage: existiert diese Kombination? ---
|
||||
sql_check = """
|
||||
SELECT 1 FROM `euro`
|
||||
WHERE z1 = %s AND z2 = %s AND z3 = %s AND z4 = %s AND z5 = %s
|
||||
LIMIT 1
|
||||
"""
|
||||
cursor.execute(sql_check, (z1, z2, z3, z4, z5))
|
||||
exists = cursor.fetchone() is not None
|
||||
|
||||
if exists:
|
||||
print("✅ Kombination existiert bereits.")
|
||||
else:
|
||||
print("🆕 Kombination ist neu – kann eingefügt werden.")
|
||||
|
||||
finally:
|
||||
connection.close()
|
||||
12
lotto2py.conf
Normal file
12
lotto2py.conf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"Telegram": {
|
||||
"Chat_ID": "322673713",
|
||||
"TOKEN": "680737840:AAEaa7Vxl_kZz_LWS1_S-lH6Eda7HXqu6Y4"
|
||||
},
|
||||
"mail": {
|
||||
"mail_folder": "",
|
||||
"mail_host": "",
|
||||
"mail_pass": "",
|
||||
"mail_user": ""
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue