v2.2: progressive loading, configurable default loadout, 11 new ciphers

- Progressive db loading: db_lite.json fast first paint -> full db.json swaps in
- 11 new ciphers from Alektryon's fork (AGPLv3): polygonal family (Pentagonal..Decagonal),
  English Qabalah 31, Mars Kamea, Angelic, Bacon Standard/R Standard -> 95 total (80 English)
- Configurable defaultEnabledCiphers + built-in Alphanumeric category + Base preset
- Default match mode -> Same Cipher Match; breakCipher -> Ordinal; base-4-first order
- Desktop keyboard nav for results modal; db cache-busting (databaseVersion ?v=N)
- generate_db_json emits db_lite.json; CHANGELOG/README updated
- db.json + db_lite.json ship as Release assets (gitignored)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
malonehunterandClaude Opus 4.7 committed 2026-05-28 12:48:13 -04:00
1 parent 1827fe23f3
commit 2570372ebf
10 files changed
+605 -311

No files matched your search

+31
View File
@@ -18,6 +18,15 @@ from pathlib import Path
from all_ciphers import get_ciphers, compute_value
# Lite db.json cipher subset for progressive first-paint. MUST stay in sync with
# production config.js `defaultEnabledCiphers` (the default 16-cipher loadout).
LITE_CIPHERS = [
"Ordinal", "Reduction", "Reverse Ordinal", "Reverse Reduction",
"Standard", "Latin (Jewish)", "English Sumerian", "Satanic Gematria",
"Bacon Simple", "Septenary", "Chaldean (Cheiro)", "Primes",
"Alphanumeric Qabbala", "Synx", "Alphanumeric Case Sensitive", "English Qaballa",
]
def main():
in_path = Path(sys.argv[1] if len(sys.argv) > 1 else "db_track_a.txt")
@@ -74,6 +83,28 @@ def main():
size_mb = out_path.stat().st_size / 1024 / 1024
print(f"Done. {n} entries, {size_mb:.1f} MB, {time.time()-t0:.0f}s total")
# --- lite db.json: only LITE_CIPHERS columns, for progressive first-paint ---
missing = [c for c in LITE_CIPHERS if c not in cipher_order]
if missing:
print(f"WARNING: LITE_CIPHERS not in cipher_order (skipped): {missing}")
lite_idx = [cipher_order.index(c) for c in LITE_CIPHERS if c in cipher_order]
lite_order = [cipher_order[i] for i in lite_idx]
lite_data = [[row[0]] + [row[i + 1] for i in lite_idx] for row in data]
lite_out = {
"version": 2,
"format": "HYPER_CYPHERS",
"tier": "lite",
"generated": date.today().isoformat(),
"entries": n,
"cipher_order": lite_order,
"data": lite_data,
}
lite_path = out_path.with_name(out_path.stem + "_lite" + out_path.suffix)
with open(lite_path, "w", encoding="utf-8") as f:
json.dump(lite_out, f, separators=(",", ":"))
lite_mb = lite_path.stat().st_size / 1024 / 1024
print(f"Lite: {len(lite_order)} ciphers -> {lite_path.name}, {lite_mb:.1f} MB")
if __name__ == "__main__":
main()