Ledger shows each payout's username (Marty 2026-11-09), linked only when the member has a Stack POL page; LinkSpin zone spots on the blog index, posts and ledger (one zone per screen size, the hidden size never loads)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@
|
||||
- opt-in: /root/stackpol-indexer/optin.txt (one username per line) plus IAP's stack-optin.json when present
|
||||
It builds one snapshot (network totals, per-program totals, last 7 days, latest 300 payouts, a stack per opted-in member) and
|
||||
POSTs it to https://stackpol.com/api/ingest with the key in /root/.stackpol-ingest-key. Nothing is written anywhere else.
|
||||
Members who have not opted in are never named: their rows show as "a member".
|
||||
The ledger shows each payout's username (Marty 2026-11-09); only opted-in members get a public stack page.
|
||||
Usage: indexer.py [--dry] (print a summary, no POST)"""
|
||||
import json, os, subprocess, sys, time, urllib.request, glob
|
||||
|
||||
@@ -127,12 +127,12 @@ def main():
|
||||
programs = {k: {'pol': round(v['pol'], 4), 'payments': v['payments'], 'wallets': len(v['w'] - {''}), 'first': v['first'], 'last': v['last']} for k, v in progs.items()}
|
||||
l7 = [r for r in rows if r['ts'] >= now - 7 * DAY]
|
||||
rows.sort(key=lambda r: r['ts'], reverse=True)
|
||||
recent = [{'k': r['k'], 'pol': round(r['pol'], 4), 'tx': r['tx'], 'ts': r['ts'], 'u': r['u'] if r['u'] in opt else None} for r in rows[:300]]
|
||||
recent = [{'k': r['k'], 'pol': round(r['pol'], 4), 'tx': r['tx'], 'ts': r['ts'], 'u': r['u'] or None, 'pub': r['u'] in opt} for r in rows[:300]] # Marty 11-09: the ledger always shows the username; pub = has a public page
|
||||
prog_recent = {} # each program's own latest 20 (a quiet program still has rows on its page)
|
||||
for r in rows:
|
||||
lst = prog_recent.setdefault(r['k'], [])
|
||||
if len(lst) < 20:
|
||||
lst.append({'k': r['k'], 'pol': round(r['pol'], 4), 'tx': r['tx'], 'ts': r['ts'], 'u': r['u'] if r['u'] in opt else None})
|
||||
lst.append({'k': r['k'], 'pol': round(r['pol'], 4), 'tx': r['tx'], 'ts': r['ts'], 'u': r['u'] or None, 'pub': r['u'] in opt})
|
||||
stacks = {}
|
||||
for un in sorted(opt):
|
||||
mine = [r for r in rows if r['u'] == un]
|
||||
|
||||
Reference in New Issue
Block a user