Files
martbost 6aeb1b2146 Rubric red flag 4 sharpened (Marty 2026-11-16): forced High only when earlier buyers are paid from later buyers' payments; sponsor commissions on a delivered product are disclosed and scored, not auto-flagged
Deterministic payout read (chain/payouts.py): every payout matched to the buyer of the same tx and classed operator /
referral line / earlier buyer outside the line. Earlier-buyer payouts = VERIFIED red flag 4. A model red flag 4 is
INFERRED, must cite evidence, and is not applied when the chain shows only operator and referral-line payouts
(shown on the report as 'Considered and not applied'). Same test for every contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:26:07 -06:00

161 lines
13 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Builds the static pages (report permalink, my checks, admin, legal pages, rubric, 404) with one shared head.
Plain readable wording, no em dashes, none of the banned words, no postal address (Marty 2026-11-16). Run: python tools/build-pages.py"""
import os, html
H = os.path.dirname(os.path.abspath(__file__)); PUB = os.path.join(H, '..', 'public')
UPDATED = 'November 16, 2026'
def page(title, desc, body, scripts=('common.js',), legal=False):
sc = ''.join('<script src="/assets/%s?v=3"></script>\n' % s for s in scripts)
main = body
if legal:
main = ('<div class="wrap legal-grid" style="padding-top:40px;padding-bottom:56px"><main class="legal">%s</main><aside id="sideSlot" aria-label="Advertisement"></aside></div>' % body)
return '''<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>%s | WebWorthIt</title>
<meta name="description" content="%s">
<meta name="theme-color" content="#0E2A22">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
<link rel="stylesheet" href="/assets/wwi.css?v=2">
</head>
<body>
%s
%s</body>
</html>
''' % (html.escape(title), html.escape(desc), main, sc + ('<script src="/assets/side.js?v=2"></script>\n' if legal else ''))
PUBLIC_LINE = ('Every WebWorthIt check uses only public information that anyone could look up on their own: public blockchain records, '
'verified or decompiled public contract code, and the project\'s public website. We do not access private data, we do not hack anything, '
'we do not sign in to or interact with the project, and we do not move funds. A check is read-only.')
OPINION_LINE = ('Our findings are public facts, each one tagged and linked to its on-chain or website source. The scores, the grade (for example "High risk") '
'and the verdict are our opinion, formed by applying our published rubric to those public facts.')
ADVICE_LINE = 'A report is information about code and on-chain records. It is not financial advice and it is not a judgment of any person.'
REPLY_LINE = 'A project can reply to its check in its public thread.'
privacy = '''<p class="eyebrow">Updated %s</p><h1>Privacy Policy</h1>
<p>TrustClickz runs WebWorthIt. This page says what we keep and why, in plain words.</p>
<h2>What we store</h2>
<ul>
<li><b>The checks you run.</b> The website and the contract address you entered, the chain, the time, and the result we produced.</li>
<li><b>A hashed version of your IP address.</b> We use it only to count free checks (1 a day without an account, 3 a day for members). We store a one-way hash, never the raw address.</li>
<li><b>Screenshots of public pages.</b> When you enter a website, our own browser opens that public page and saves a screenshot, so the report shows what the page said at that time.</li>
<li><b>If you sign in with the network:</b> your network email, username and the wallet address on your network account, so your checks, vouchers and referral link follow you. When you buy, the sponsor line that would be paid is recorded with the sale.</li>
<li><b>Vouchers and test codes</b> you redeem, with the time, so a code is used only as often as it allows.</li>
<li><b>A browser cookie</b> that keeps your vouchers and settings on this browser, and a cookie that remembers who referred you (30 days).</li>
</ul>
<h2>Joining and emails</h2>
<ul>
<li>Joining WebWorthIt is free and gives you one account across the network: the same account signs you in on the other network sites. Your network sponsor is the member whose link brought you here.</li>
<li>To join or sign in you give your email address. We send you a one-time sign-in link. That email is sent because you asked for it.</li>
<li>Network news and tips are sent only if you tick the box to receive them. Every one of those emails has an unsubscribe link, and you can unsubscribe at any time.</li>
</ul>
<h2>What we never do</h2>
<ul>
<li>We never ask anyone to connect a wallet to run a check. A check is read-only.</li>
<li>We never access private data about a project or a person. %s</li>
<li>We do not sell personal data.</li>
</ul>
<h2>Sharing</h2>
<p>Your WebWorthIt account is part of the network: your username, wallet and sponsor are shared with the network hub so one account works on every network site. Checks you run are private to you unless you share the link. Checks of our own network contracts are published on purpose.</p>
<h2>Your choices</h2>
<p>Ask network support to delete your data. The network hub removes it from every network site, except what the blockchain or the law keeps.</p>
<p>Questions: <a href="https://instantadpay.com/support?from=webworthit">network support</a>. WebWorthIt is run by TrustClickz.</p>''' % (UPDATED, PUBLIC_LINE)
terms = '''<p class="eyebrow">Updated %s</p><h1>Terms and Conditions</h1>
<p>These terms cover your use of WebWorthIt, run by TrustClickz. By using the site you accept them.</p>
<h2>What a check is</h2>
<p>%s</p>
<p>%s</p>
<p>%s %s</p>
<h2>Accuracy</h2>
<p>We check every address, transaction and number in a written report against the evidence our tools read. A report that does not pass that check is not shown; only the facts read straight from the chain are shown. Public nodes can fail or limit what they return, so every report says which block range was read and what could not be read. Blockchain records change all the time: a report describes the state at the block it names.</p>
<h2>Free checks, deep reports and vouchers</h2>
<ul><li>Every visitor gets 1 free check a day; members (free to join) get 3 a day. Without an account a free check shows the grade, the verdict and the first finding; members see the full free report.</li><li>Deep reports, report packs and watch alerts are one-time payments. No subscriptions.</li><li>Vouchers add reports or free checks as stated on the voucher, may expire, and have no cash value.</li><li>Sponsor rewards: when someone a member referred buys, the sponsor line is paid as published on the site (20%% to the direct sponsor, 5%% on levels 2 to 5). You are paid only when people choose to buy. Voucher redemptions pay nothing.</li></ul>
<h2>Fair use</h2>
<p>Do not use the site to attack, overload or scrape other services, and do not enter sites or addresses you have no reason to check. We may limit or refuse checks to keep the service working for everyone.</p>
<h2>No warranty</h2>
<p>WebWorthIt is provided as it is. To the extent the law allows, TrustClickz is not liable for decisions you make with or without a report. See the <a href="/disclaimer">Disclaimer</a>.</p>
<h2>Contact</h2>
<p><a href="https://instantadpay.com/support?from=webworthit">Network support</a>.</p>''' % (UPDATED, PUBLIC_LINE, OPINION_LINE, ADVICE_LINE, REPLY_LINE)
disclaimer = '''<p class="eyebrow">Updated %s</p><h1>Disclaimer</h1>
<p><b>Public information only.</b> %s</p>
<p><b>Facts and opinion are kept apart.</b> %s Scores are never for sale: there are no badges to buy and no paid removals.</p>
<p><b>Not advice.</b> %s Nothing on this site tells you to join, leave, buy, sell or withdraw. Make your own decision, with your own research.</p>
<p><b>Code and records, not people.</b> We describe what a contract can do and what the chain shows. We do not say anything about the intentions or character of anyone behind a project. %s</p>
<p><b>Limits.</b> Our tools read public nodes, which can fail or return less than the full history. Function names for unverified code come from public signature databases and are marked INFERRED. What we cannot see is marked UNKNOWN.</p>''' % (UPDATED, PUBLIC_LINE, OPINION_LINE, ADVICE_LINE, REPLY_LINE)
rubric_md = open(os.path.join(H, '..', 'chain', 'rubric.md'), encoding='utf8').read()
def md(s):
out = []; inlist = False
for line in s.splitlines():
if line.startswith('# '): continue
if line.startswith('## '):
if inlist: out.append('</ul>'); inlist = False
out.append('<h2>%s</h2>' % html.escape(line[3:])); continue
if line.startswith('- ') or (line[:2].isdigit() if line else False) or (line[:1].isdigit() and line[1:3] == '. '):
if not inlist: out.append('<ul>'); inlist = True
out.append('<li>%s</li>' % html.escape(line.split(' ', 1)[1]).replace('`', '')); continue
if inlist and line.startswith(' ') and line.strip() and out and out[-1].endswith('</li>'):
out[-1] = out[-1][:-5] + ' ' + html.escape(line.strip()).replace('`', '') + '</li>'; continue # wrapped list item
if inlist and line.strip() == '': out.append('</ul>'); inlist = False; continue
if line.strip():
if out and out[-1].startswith('<p>') and not inlist: out[-1] = out[-1][:-4] + ' ' + html.escape(line.strip()).replace('`', '') + '</p>' # wrapped paragraph
else: out.append('<p>%s</p>' % html.escape(line.strip()).replace('`', ''))
if inlist: out.append('</ul>')
return '\n'.join(out)
rubric = ('<p class="eyebrow">The published rubric</p><h1>How a check is scored</h1><p>%s</p>' % html.escape(OPINION_LINE)) + md(rubric_md)
report = '''<main class="wrap" style="padding-top:40px;padding-bottom:40px;display:flex;flex-direction:column;gap:24px">
<div id="live" style="display:flex;flex-direction:column;gap:24px"><div class="steps">Loading the check...</div></div>
<p style="margin:0"><a href="/#check">Run another check</a></p>
</main>'''
my = '''<main class="wrap" style="padding-top:40px;padding-bottom:40px;display:flex;flex-direction:column;gap:20px">
<h1 style="font-size:40px">My checks</h1>
<div id="out"><p>Loading...</p></div>
</main>'''
admin = '''<main class="wrap" style="padding-top:32px;padding-bottom:40px;display:flex;flex-direction:column;gap:20px">
<h1 style="font-size:36px">WebWorthIt admin</h1>
<div id="tok" class="card"><span>Admin token</span><div style="display:flex;gap:10px;flex-wrap:wrap"><input id="token" class="code" type="password" style="flex:1 1 300px"><button id="save" class="btn dark" type="button">Open</button></div></div>
<div id="out"></div>
</main>'''
joinp = '''<main class="wrap" style="padding-top:48px;padding-bottom:56px;max-width:640px;display:flex;flex-direction:column;gap:18px">
<h1 style="font-size:40px">Join free, or sign in</h1>
<p style="margin:0;color:var(--ink2)">One account across the network. Enter your email and we send you a one-time link: it signs you in if you are already a member, or creates your free account if you are new. Joining never asks you to connect a wallet.</p>
<form id="form" class="card" novalidate>
<label for="email" style="font-weight:600">Email</label>
<input id="email" class="code" type="email" autocomplete="email" required placeholder="you@example.com">
<label style="font-size:14px;color:var(--ink2);display:flex;gap:8px;align-items:flex-start"><input id="optin" type="checkbox"> Also send me network news and tips (optional, unsubscribe any time)</label>
<button id="go" class="btn org" type="submit">Send my link</button>
</form>
<p id="msg" role="status" style="margin:0"></p>
<p style="margin:0;font-size:14px;color:var(--ink2)">Signed in on InstantAdPay or LinkSpin already? <a id="hubBtn" href="/sso/start?mode=go">Sign in with the network</a>. See the <a href="/privacy">Privacy Policy</a> for how emails are used.</p>
</main>'''
nf = '''<main class="wrap" style="padding-top:64px;padding-bottom:64px"><h1 style="font-size:40px">Page not found</h1><p><a href="/">Back to WebWorthIt</a></p></main>'''
files = {
'privacy.html': page('Privacy Policy', 'What WebWorthIt stores and why. Public information only; we never ask anyone to connect a wallet to run a check.', privacy, legal=True),
'terms.html': page('Terms and Conditions', 'Terms for using WebWorthIt, a read-only contract and website check run by TrustClickz.', terms, legal=True),
'disclaimer.html': page('Disclaimer', 'WebWorthIt uses only public information. Scores are our opinion, not financial advice.', disclaimer, legal=True),
'rubric.html': page('The rubric', 'The published rubric WebWorthIt applies to public facts to form its opinion.', rubric, legal=True),
'report.html': page('Check', 'A WebWorthIt check: public facts with sources, and our opinion from the published rubric.', report, ('common.js', 'render.js', 'report.js')),
'my.html': page('My checks', 'Your WebWorthIt checks and referral link.', my, ('common.js', 'my.js')),
'admin.html': page('Admin', 'WebWorthIt admin.', admin, ('common.js', 'admin.js')),
'join.html': page('Join free or sign in', 'One account across the network. Join WebWorthIt free or sign in with a one-time email link.', joinp, ('common.js', 'join.js')),
'404.html': page('Not found', 'Page not found.', nf),
}
for k, v in files.items():
assert '—' not in v and '–' not in v, k
for bad in ('Green' + ' Valley', 'Mo' + 'ody', '350' + '04'): assert bad not in v # no postal address anywhere (Marty 2026-11-16)
open(os.path.join(PUB, k), 'w', encoding='utf8', newline='\n').write(v)
print('ok', list(files))