Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/quarterback/SimBaseballCalc. A fantasy baseball calculator for OOTP using CSVs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>OOTP Game Log Parser</title> <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css"> <script type="module" src="https://cdn.jsdelivr.net/npm/@mark-ui/components@latest/dist/mark-ui.min.js"></script> <style> body { padding: 2rem; background: #f8f9fa; } textarea { min-height: 200px; } pre { white-space: pre-wrap; word-wrap: break-word; background: #fff; padding: 1rem; border: 1px solid #ccc; border-radius: 8px; } .tag { display: inline-block; background: #e0e0e0; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.85rem; margin-left: 0.5rem; } </style></head><body> <main class="container"> <h1>⚾ OOTP Game Log Parser</h1> <p>Paste your game log below and hit "Parse" to generate a clean summary of key moments.</p>
<mark-textarea id="logInput" placeholder="Paste OOTP game log here..."></mark-textarea> <mark-button id="parseButton">Parse Log</mark-button>
<h2>📝 Parsed Summary (Markdown)</h2> <pre id="output">(Nothing parsed yet.)</pre>
<h3>🧠 Narrative Recap (LLM integration TBD)</h3> <p>This will eventually generate a full story-style recap using GPT or Claude. Stay tuned!</p> </main>
<script> document.getElementById("parseButton").addEventListener("click", () => { const input = document.getElementById("logInput").value; const lines = input.split(/\n+/); let currentHalfInning = ""; let summary = "";
lines.forEach((line) => { if (/^(TOP|BOTTOM) OF THE/.test(line)) { currentHalfInning = line.trim(); summary += `\n### ${currentHalfInning}\n`; } else if (/HOME RUN|scores|DOUBLE|TRIPLE|steals|strikes out|caught stealing/i.test(line)) { let tag = ""; if (/HOME RUN/i.test(line)) tag = "🧨 HR"; else if (/DOUBLE/i.test(line)) tag = "🟦 2B"; else if (/TRIPLE/i.test(line)) tag = "🟨 3B"; else if (/steals/i.test(line)) tag = "🏃 Steal"; else if (/caught stealing/i.test(line)) tag = "⛔ Caught"; else if (/strikes out/i.test(line)) tag = "❌ K"; else if (/scores/i.test(line)) tag = "🏁 Run";
summary += `- ${line.trim()} ${tag ? `\`${tag}\`` : ""}\n`; } });
if (!summary.trim()) summary = "No highlights detected. Try a different log.";
document.getElementById("output").textContent = summary.trim(); }); </script></body></html>