feat: introduce a 'code' mode to display source code lines, add new font assets, and include dedicated tests for code fetching.

This commit is contained in:
2026-03-16 02:09:56 -07:00
parent c36342061f
commit d0e18518a2
6 changed files with 119 additions and 6 deletions

View File

@@ -272,11 +272,10 @@ def main():
time.sleep(0.07)
print()
_subtitle = (
"literary consciousness stream"
if config.MODE == "poetry"
else "digital consciousness stream"
)
_subtitle = {
"poetry": "literary consciousness stream",
"code": "source consciousness stream",
}.get(config.MODE, "digital consciousness stream")
print(f" {W_DIM}v0.1 · {_subtitle}{RST}")
print(f" {W_GHOST}{'' * (w - 4)}{RST}")
print()
@@ -297,6 +296,14 @@ def main():
)
print(f" {G_DIM}>{RST} {G_MID}{len(items)} STANZAS ACQUIRED{RST}")
save_cache(items)
elif config.MODE == "code":
from engine.fetch_code import fetch_code
slow_print(" > INITIALIZING SOURCE ARRAY...\n")
time.sleep(0.2)
print()
items, line_count, _ = fetch_code()
print()
print(f" {G_DIM}>{RST} {G_MID}{line_count} LINES ACQUIRED{RST}")
else:
slow_print(" > INITIALIZING FEED ARRAY...\n")
time.sleep(0.2)