diff --git a/.gitignore b/.gitignore index ca1ca3c..30287df 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,6 @@ vite.config.ts.timestamp-* llms-* +engwebu_usfx.xml embeddings-cache-L12.json embeddings-cache-L6.json -engwebu_usfx.xml diff --git a/EnglishNKJBible.xml b/EnglishNKJBible.xml index db2f224..be873df 100644 --- a/EnglishNKJBible.xml +++ b/EnglishNKJBible.xml @@ -20271,7 +20271,7 @@ Thus says the Lord: “Keep justice, and do righteousness, For My salvation is about to come, And My righteousness to be revealed. Blessed is the man who does this, And the son of man who lays hold on it; Who keeps from defiling the Sabbath, And keeps his hand from doing any evil.” - Do not let the son of the foreigner Who has joined himself to the LordSpeak, saying, “The Lord has utterly separated me from His people”; Nor let the eunuch say, “Here I am, a dry tree.” + Do not let the son of the foreigner Who has joined himself to the Lord speak, saying, “The Lord has utterly separated me from His people”; Nor let the eunuch say, “Here I am, a dry tree.” For thus says the Lord: “To the eunuchs who keep My Sabbaths, And choose what pleases Me, And hold fast My covenant, Even to them I will give in My house And within My walls a place and a name Better than that of sons and daughters; I will give them an everlasting name That shall not be cut off. “Also the sons of the foreigner Who join themselves to the Lord, to serve Him, And to love the name of the Lord, to be His servants— Everyone who keeps from defiling the Sabbath, And holds fast My covenant— diff --git a/scripts/average-guesses.ts b/scripts/average-guesses.ts new file mode 100644 index 0000000..2a07b08 --- /dev/null +++ b/scripts/average-guesses.ts @@ -0,0 +1,53 @@ +import Database from 'bun:sqlite'; + +// Database path - adjust if your database is located elsewhere +const dbPath = process.env.DATABASE_URL || './local.db'; + +console.log(`Connecting to database: ${dbPath}`); + +const db = new Database(dbPath); + +// Query all rows from daily_completions +const query = db.query(` + SELECT date, guess_count + FROM daily_completions + ORDER BY date +`); + +const rows = query.all() as { date: string; guess_count: number }[]; + +if (rows.length === 0) { + console.log('No completions found in the database.'); + db.close(); + process.exit(0); +} + +// Group by date and calculate average guesses +const dateStats = new Map(); + +for (const row of rows) { + const existing = dateStats.get(row.date) || { total: 0, count: 0 }; + existing.total += row.guess_count; + existing.count += 1; + dateStats.set(row.date, existing); +} + +// Display results +console.log('\n=== Average Guesses Per Day ===\n'); +console.log('Date | Avg Guesses | Total Completions'); +console.log('--------------|-------------|-------------------'); + +for (const [date, stats] of dateStats) { + const avg = (stats.total / stats.count).toFixed(2); + console.log(`${date.padEnd(14)}| ${avg.padStart(11)}| ${stats.count.toString().padStart(19)}`); +} + +// Calculate overall average +const totalGuesses = Array.from(dateStats.values()).reduce((sum, s) => sum + s.total, 0); +const totalCompletions = Array.from(dateStats.values()).reduce((sum, s) => sum + s.count, 0); +const overallAvg = (totalGuesses / totalCompletions).toFixed(2); + +console.log('--------------|-------------|-------------------'); +console.log(`Overall Average: ${overallAvg} guesses across ${totalCompletions} completions`); + +db.close(); diff --git a/src/lib/components/VerseDisplay.svelte b/src/lib/components/VerseDisplay.svelte index 8455f74..e045399 100644 --- a/src/lib/components/VerseDisplay.svelte +++ b/src/lib/components/VerseDisplay.svelte @@ -6,13 +6,16 @@ let displayReference = $derived( dailyVerse.reference.replace(/^Psalms /, "Psalm ") ); + let displayVerseText = $derived( + dailyVerse.verseText.replace(/^([a-z])/, (c) => c.toUpperCase()) + );
- {dailyVerse.verseText} + {displayVerseText}
{#if isWon}

diff --git a/src/lib/components/WinScreen.svelte b/src/lib/components/WinScreen.svelte index e11d0db..487a634 100644 --- a/src/lib/components/WinScreen.svelte +++ b/src/lib/components/WinScreen.svelte @@ -1,6 +1,7 @@ - Bibdle — A daily bible game{isDev ? " (dev)" : ""} - Bibdle — A daily bible game{isDev ? " (dev)" : ""} --> + A daily bible game{isDev ? " (dev)" : ""} +

diff --git a/src/routes/layout.css b/src/routes/layout.css index a1824ae..77a35d8 100644 --- a/src/routes/layout.css +++ b/src/routes/layout.css @@ -7,7 +7,7 @@ } html, body { - background: oklch(98.11% 0.02777 158.93); + background: oklch(89.126% 0.06134 298.626); } .big-text { diff --git a/todo.md b/todo.md index 486b49c..a02acba 100644 --- a/todo.md +++ b/todo.md @@ -1,26 +1,37 @@ +# in progress + +- root menu: classic / imposter mode / impossible mode (complete today's classic and imposter modes to unlock) + # todo -- Difficulty levels -- difficult mode (guess old or new testament, first try _only_) -- impossible mode (1894 scrivener koine greek NT or some hebrew version for OT) three guesses only +- impossible mode (1904 greek bible) three guesses only. -- "login to see your stats, unlock practice mode, and more" + - share both classic and impossible mode with both buttons + +- add imposter mode + +- instructions + + - classic mode: identify what book the verse is from (e.g. Genesis, John, Revelations...) in as few guesses as possible. + - imposter mode: out of four options, identify the verse that is not in the Bible + - impossible mode: identify which book of the bible the verse is from in less than three guesses. + +- add login + saved stats + streak etc. + +- add deuterocanonical books + + - Practice mode: Unlimited verses - Create public or private leaderboards -- Passport book with badges: +- Passport book with awards: - Guess each Gospel first try - "Guessed all Gospels", "Perfect week", "Old Testament expert" - Theologian: Guess each book first try + - If chapter is 6 and verse 7, earn award "Six seven" -- instructions - -# places to send - -- linkedin post -- ocf discord server ✅ -- nick makiej ✅ +- difficult mode (guess old or new testament, first try _only_) (???) # About this game @@ -36,6 +47,16 @@ I created Bibdle from a combination of two things. The first is my lifelong desi # done +## december 27th + +- add event log to submitting first-guess or correct-guess to umami (to make bounce rate more accurate) + +## december 26th + +- created embeddings for every bible verse (verse similarity finder) +- failed at having AI write a USFX format parser +- found a npm library for parsing USFX + ## december 23rd - switched to local copy of NKJV