[object Object]

← back to Govarbitrage

Go-live: george-env runtime cred injection (py), newsletter server + digest wrappers, launchd 6am/5pm subscriber digest

974fc376bd50bffc5e591f0e5948ffaff572746c · 2026-07-13 09:19:04 -0700 · Steve Abrams

Files touched

Diff

commit 974fc376bd50bffc5e591f0e5948ffaff572746c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 13 09:19:04 2026 -0700

    Go-live: george-env runtime cred injection (py), newsletter server + digest wrappers, launchd 6am/5pm subscriber digest
---
 scripts/george-env.py | 17 +++++++++++++++++
 scripts/george-env.sh | 17 +++--------------
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/scripts/george-env.py b/scripts/george-env.py
new file mode 100644
index 0000000..4a4d1fc
--- /dev/null
+++ b/scripts/george-env.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+"""Print export lines for George transport creds, read at runtime from their
+canonical homes (~/.claude.json, george-gmail/.env) — never duplicated to disk.
+Used via: eval "$(/usr/bin/python3 scripts/george-env.py)"."""
+import json, os, re, shlex
+
+env = json.load(open(os.path.expanduser("~/.claude.json")))["mcpServers"]["george"]["env"]
+print("export GEORGE_URL=" + shlex.quote(env["GEORGE_URL"]))
+print("export GEORGE_BASIC_AUTH=" + shlex.quote(env["GEORGE_BASIC_AUTH"]))
+
+tok = ""
+pat = re.compile(r"GEORGE_EXTERNAL_SEND_TOKEN=[\"']?([^\"'\n]+)")
+for line in open(os.path.expanduser("~/Projects/george-gmail/.env")):
+    m = pat.match(line)
+    if m:
+        tok = m.group(1)
+print("export GEORGE_EXTERNAL_SEND_TOKEN=" + shlex.quote(tok))
diff --git a/scripts/george-env.sh b/scripts/george-env.sh
index 891e5bc..4a5060d 100755
--- a/scripts/george-env.sh
+++ b/scripts/george-env.sh
@@ -1,17 +1,6 @@
 #!/bin/sh
 # Source this to export George transport credentials for THIS PROCESS ONLY.
 # Reads from their canonical homes at runtime — never duplicated to disk
-# (same pattern as run-digest.sh). Used by run-newsletter-server.sh and
-# run-newsletter-digest.sh.
-eval "$(/usr/bin/python3 - <<'PY'
-import json, os, re, shlex
-env = json.load(open(os.path.expanduser("~/.claude.json")))["mcpServers"]["george"]["env"]
-print("export GEORGE_URL=" + shlex.quote(env["GEORGE_URL"]))
-print("export GEORGE_BASIC_AUTH=" + shlex.quote(env["GEORGE_BASIC_AUTH"]))
-tok = ""
-for line in open(os.path.expanduser("~/Projects/george-gmail/.env")):
-    m = re.match(r'GEORGE_EXTERNAL_SEND_TOKEN=["\']?([^"\'\n]+)', line)
-    if m: tok = m.group(1)
-print("export GEORGE_EXTERNAL_SEND_TOKEN=" + shlex.quote(tok))
-PY
-)"
+# (same pattern as run-digest.sh). Logic lives in george-env.py because
+# heredocs inside $() are unreliable under plain sh.
+eval "$(/usr/bin/python3 "$(dirname "$0")/george-env.py")"

← c484634 Newsletter live transport: George /api/send with external-se  ·  back to Govarbitrage  ·  5x live verification: 2 consecutive clean sweeps, 0 defects 059a054 →