app
Wiki Notify for Google Chat
Public Made by Adomby adom
Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.
← Commit history
Publish 1.8.2
4 files changed
+23−9
bin/__pycache__/wiki-notify-gchatcpython-312.pyc⋯ 1 unchanged line ⋯
bin/wiki-notify-gchat+21−7@@ -246,13 +246,19 @@ def parse_wiki_ts(raw): return None def page_info(page, state):- """Author + raster hero URL of a wiki page via `adom-wiki page stats`- (cached in state). Hero must be a public raster blob - Chat's image proxy- does not render the SVG /hero/ billboard endpoint."""+ """Author + raster hero URL of a wiki page via `adom-wiki page stats`,+ cached with a 24h TTL (heroes get renamed on republish, pages get+ renamed/deleted, and the wiki's file route itself has migrated - the old+ /blob/<type>/<slug>/ scheme died 2026-08; current is+ /api/pages/<owner>/<slug>/files/<path>). The hero is validated with an+ ANONYMOUS fetch before caching, because Chat's image proxy fetches+ anonymously: private pages 404 to it and would render a broken-image+ glyph on the board - better no image than a broken one.""" cache = state.setdefault("pageInfo", {})- if page in cache:- return cache[page]- info = {"author": "", "hero": ""}+ entry = cache.get(page)+ if entry and time.time() - entry.get("at", 0) < 86400:+ return entry+ info = {"author": "", "hero": "", "at": time.time()} code, out, _ = run_cmd(["adom-wiki", "page", "stats", page, "--json"]) if code == 0: try:@@ -261,9 +267,17 @@ def page_info(page, state): info["author"] = pg.get("author_name") or "" hp = pg.get("hero_path") or "" if hp.lower().endswith((".png", ".jpg", ".jpeg", ".gif")):- info["hero"] = f"https://wiki.adom.inc/blob/{pg.get('type', 'app')}/{pg.get('slug')}/{hp}"+ url = f"https://wiki.adom.inc/api/pages/{page}/files/{hp}"+ c2, probe, _ = run_cmd(["curl", "-s", "-o", "/dev/null",+ "-w", "%{http_code}", "--max-time", "10", url])+ if c2 == 0 and probe.strip() == "200":+ info["hero"] = url+ else:+ log_line(f"OK page_info: no public hero for {page} (anon fetch {probe.strip() or 'failed'})") except Exception: pass+ elif entry:+ return entry # stats lookup failed: keep serving the stale entry rather than blanking cache[page] = info save_state(state) return info
package.json+1−1@@ -2,7 +2,7 @@ "slug": "wiki-notify-gchat", "title": "Wiki Notify for Google Chat", "type": "app",- "version": "1.8.1",+ "version": "1.8.2", "description": "Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.", "tags": [ "cli",
page.json+1−1@@ -2,7 +2,7 @@ "slug": "wiki-notify-gchat", "title": "Wiki Notify for Google Chat", "type": "app",- "version": "1.8.1",+ "version": "1.8.2", "description": "Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.", "tags": [ "cli",