Improve Telegram notifications and fix data paths
- Enhanced Telegram message format to show TOP 3 by Confidence AND Quality - Added average statistics (Confidence & Quality) to notifications - Fixed hardcoded iCloud path in generator (now uses --data-dir parameter) - Updated AlleEurojackpotzahlen.csv with latest draw (Jan 9) - Added run_update_and_learn.sh wrapper script - Created com.eurojackpot.update.plist for automated updates Benefits: - Better tip selection with dual metrics visibility - Generator now works with correct project paths - More robust automation setup Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6f7276276d
commit
ca003e44b7
6 files changed
+116
-15
No files matched your search
+37
-13
@@ -60,24 +60,41 @@ class EurojackpotNotifier:
|
||||
"""
|
||||
subject = f"🎲 {len(tips)} neue Eurojackpot-Tipps generiert!"
|
||||
|
||||
# Sortiere Tips nach Confidence
|
||||
sorted_tips = sorted(tips, key=lambda x: x.get('confidence', 0), reverse=True)
|
||||
# Statistiken
|
||||
avg_conf = sum(t.get('confidence', 0) for t in tips) / len(tips) if tips else 0
|
||||
avg_qual = sum(t.get('quality', 0) for t in tips) / len(tips) if tips else 0
|
||||
|
||||
# Top 5 formatieren
|
||||
top5_text = ""
|
||||
for i, tip in enumerate(sorted_tips[:5], 1):
|
||||
# Top 3 nach Confidence
|
||||
sorted_by_conf = sorted(tips, key=lambda x: x.get('confidence', 0), reverse=True)[:3]
|
||||
top3_conf_text = ""
|
||||
for i, tip in enumerate(sorted_by_conf, 1):
|
||||
emoji = "🥇" if i == 1 else "🥈" if i == 2 else "🥉"
|
||||
main = tip.get('main_numbers', '?')
|
||||
euro = tip.get('euro_numbers', '?')
|
||||
conf = tip.get('confidence', 0)
|
||||
strat = tip.get('strategy', 'UNKNOWN')
|
||||
qual = tip.get('quality', 0)
|
||||
strat = tip.get('strategy', 'UNKNOWN')
|
||||
|
||||
# Emoji basierend auf Rang
|
||||
emoji = "🏆" if i == 1 else "🥈" if i == 2 else "🥉" if i == 3 else "⭐"
|
||||
|
||||
top5_text += f"""{emoji} #{i} - Confidence: {conf:.2%}
|
||||
top3_conf_text += f"""{emoji} #{i} - Conf: {conf:.2%} | Q: {qual:.3f}
|
||||
🔢 {main} + ⭐ {euro}
|
||||
📈 {strat} | Quality: {qual:.3f}
|
||||
📈 {strat}
|
||||
|
||||
"""
|
||||
|
||||
# Top 3 nach Quality
|
||||
sorted_by_qual = sorted(tips, key=lambda x: x.get('quality', 0), reverse=True)[:3]
|
||||
top3_qual_text = ""
|
||||
for i, tip in enumerate(sorted_by_qual, 1):
|
||||
emoji = "🥇" if i == 1 else "🥈" if i == 2 else "🥉"
|
||||
main = tip.get('main_numbers', '?')
|
||||
euro = tip.get('euro_numbers', '?')
|
||||
conf = tip.get('confidence', 0)
|
||||
qual = tip.get('quality', 0)
|
||||
strat = tip.get('strategy', 'UNKNOWN')
|
||||
|
||||
top3_qual_text += f"""{emoji} #{i} - Q: {qual:.3f} | Conf: {conf:.2%}
|
||||
🔢 {main} + ⭐ {euro}
|
||||
📈 {strat}
|
||||
|
||||
"""
|
||||
|
||||
@@ -87,9 +104,16 @@ class EurojackpotNotifier:
|
||||
📊 Anzahl Tipps: {len(tips)}
|
||||
⏰ Zeitpunkt: {timestamp}
|
||||
|
||||
🏆 TOP 5 EMPFEHLUNGEN:
|
||||
📊 STATISTIKEN:
|
||||
🎯 Ø Confidence: {avg_conf:.4f}
|
||||
💎 Ø Quality: {avg_qual:.4f}
|
||||
|
||||
🎯 TOP 3 NACH CONFIDENCE:
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
{top5_text}
|
||||
{top3_conf_text}
|
||||
💎 TOP 3 NACH QUALITY:
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
{top3_qual_text}
|
||||
💡 Alle 10 Tipps findest du in der CSV-Datei!
|
||||
|
||||
Viel Glück! 🍀
|
||||
|
||||
Reference in new issue
Block a user