Daily snapshot: lay the numbers out so a phone can read them

The post was one paragraph per subject, and on a phone every line wrapped into
a block of text with nothing to catch the eye. It is now a heading and two or
three short lines per subject, with a blank line between, the date under the
title, and no line long enough to wrap on a narrow screen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-22 09:58:07 -05:00
parent c47905d89a
commit 5c11bfa502
+30 -11
View File
@@ -53,18 +53,37 @@ async function gather(now = Date.now()) {
return s;
}
// One block per subject, a blank line between them, and no line long enough for a phone to wrap it
// into a wall of text (Marty, 2026-09-22 — the single-paragraph version was unreadable on mobile).
function compose(s, cta) {
const trend = (cur, prev, what) => cur > prev ? ' (up from ' + n(prev) + ' ' + what + ')' : cur < prev ? ' (' + n(prev) + ' ' + what + ')' : '';
const L = [];
L.push('\u{1F4C8} <b>InstantAdPay</b> · 24-hour snapshot');
L.push('\u{1F465} Sign-ups: <b>' + n(s.signups) + '</b>' + trend(s.signups, s.signupsPrior, 'the day before') + ' · ' + n(s.activations) + ' switched on payouts');
L.push('\u{1F9FE} Purchases: <b>' + n(s.buys) + '</b> for $' + n(Math.round(s.usd)) + trend(s.buys, s.buysPrior, 'the day before') + ' · <b>' + pol(s.paidWei) + ' POL</b> paid to members in the same transactions');
L.push('\u{1F4E3} Campaigns: <b>' + n(s.campaigns) + '</b> posted by ' + n(s.advertisers) + ' advertiser' + (s.advertisers === 1 ? '' : 's') + ' · ' + n(s.active) + ' running now · ' + n(s.imps) + ' ad impressions served');
L.push('\u{1F440} Earning: <b>' + n(s.viewers) + '</b> members viewed ads today · ' + n(s.seen24h) + ' signed in');
L.push('\u{1F4B3} Credits: <b>' + n(s.creditsHandedOut) + '</b> handed out · <b>' + n(s.creditsEarned) + '</b> earned by viewing · ' + n(s.creditsSpent) + ' spent on ads');
L.push('\u{1F3C1} So far: <b>' + n(s.members) + '</b> members · ' + n(s.wallets) + ' wallets linked · ' + n(s.payoutsOn) + ' with payouts on · ' + n(s.lifeBuys) + ' purchases · <b>' + pol(s.lifePaidWei) + ' POL</b> paid out in ' + n(s.lifePayouts) + ' payouts, every one on the public ledger');
L.push('<a href="https://instantadpay.com/ledger">Live ledger</a>' + (cta ? ' · <a href="' + cta + '">Join free</a>' : ''));
return L.join('\n');
const up = (cur, prev) => cur > prev ? ', up from ' + n(prev) + ' yesterday'
: cur < prev ? ', down from ' + n(prev) + ' yesterday' : '';
const plural = (c, word) => n(c) + ' ' + word + (Number(c) === 1 ? '' : 's');
const day = new Date().toLocaleDateString('en-US', { timeZone: 'America/Chicago', weekday: 'long', month: 'long', day: 'numeric' });
const B = [];
B.push('\u{1F4C8} <b>InstantAdPay · 24-hour snapshot</b>\n<i>' + day + '</i>');
B.push('\u{1F465} <b>Sign-ups</b>\n'
+ '<b>' + n(s.signups) + '</b> new' + up(s.signups, s.signupsPrior) + '\n'
+ n(s.activations) + ' switched on payouts');
B.push('\u{1F9FE} <b>Purchases</b>\n'
+ '<b>' + n(s.buys) + '</b> for <b>$' + n(Math.round(s.usd)) + '</b>' + up(s.buys, s.buysPrior) + '\n'
+ '<b>' + pol(s.paidWei) + ' POL</b> paid to members\nin the same transactions');
B.push('\u{1F4E3} <b>Campaigns</b>\n'
+ '<b>' + n(s.campaigns) + '</b> posted by ' + plural(s.advertisers, 'advertiser') + '\n'
+ n(s.active) + ' running · ' + n(s.imps) + ' impressions');
B.push('\u{1F440} <b>Earning</b>\n'
+ '<b>' + n(s.viewers) + '</b> members viewed ads today\n'
+ n(s.seen24h) + ' signed in');
B.push('\u{1F4B3} <b>Credits</b>\n'
+ '<b>' + n(s.creditsHandedOut) + '</b> handed out · <b>' + n(s.creditsEarned) + '</b> earned\n'
+ n(s.creditsSpent) + ' spent on ads');
B.push('\u{1F3C1} <b>So far</b>\n'
+ '<b>' + n(s.members) + '</b> members · ' + n(s.wallets) + ' wallets linked\n'
+ n(s.payoutsOn) + ' with payouts on · ' + n(s.lifeBuys) + ' buys\n'
+ '<b>' + pol(s.lifePaidWei) + ' POL</b> paid in ' + n(s.lifePayouts) + ' payouts\n'
+ 'All of it on the public ledger.');
B.push('<a href="https://instantadpay.com/ledger">Live ledger</a>' + (cta ? ' · <a href="' + cta + '">Join free</a>' : ''));
return B.join('\n\n');
}
async function post() {