Central platform for European atproto.<cc> country community websites forked from atcommons.eu/website
website scripts
37 files

attribution.py
check-copy-voice.mjs
collect-countries.sh
country-tlds.json
deploy-codeberg.sh
estimate-nl-users.py
eu-estimate.py
eu-infra-pds.py
eu-lang-speakers.json
eu-stats-aggregate.py
eu-verifier-lists.py
eu-verifier-lists.txt
facts-aggregate.py
gen-banners.mjs
gen-brand.mjs
gen-brandkit.mjs
gen-icons.mjs
nl-collector-day.sh
nl-collector-supervisor.sh
nl-company-candidates.py
nl-company-triage.py
nl-did-facts.py
nl-estimate-latest.json
nl-handle-class.py
nl-handle-revalidate.py
nl-handles-scan.py
nl-lexicons.py
nl-sifa-company.py
nl-sifa-location.py
nl-starterpacks.py
nl-starterpacks.txt
nl-stats-aggregate.py
nl-stats-publish.sh
nl-triage-ledger.py
og-card.mjs
publish-nl-stats.sh
README.md
README.md
# Scripts ## estimate-nl-users.py Approximates how many people in the Netherlands are on AT Protocol by sampling the public Jetstream firehose. See the docstring at the top of the file, and the methodology on `/community-size`. ```sh uv run scripts/estimate-nl-users.py [seconds] [out.json] ``` Output is JSON: total posts, Dutch posts and their share, distinct Dutch-posting accounts, resolved handle suffixes (.nl / .be / other), and the current Bluesky account total from bsky.jazco.dev/stats. Feed the numbers into `src/data/nl-estimate.ts`, rebuild, and redeploy. ### Why run it long Dutch activity peaks in the evening (UTC+2). A short window over- or under-counts depending on the time of day, so a representative figure needs a full day or more. The script auto-reconnects across the whole window and writes `<out>.partial` every five minutes so you can watch progress and survive a mid-run drop. ### Running a full day on a server With uv installed: ```sh uv run scripts/estimate-nl-users.py 86400 ~/atproto-nl/nl-24h.json ``` Or in a container (no local Python needed): ```sh docker run --rm -v "$PWD:/w" -w /w python:3.12-slim sh -c \ "pip install -q websockets && python scripts/estimate-nl-users.py 86400 nl-24h.json" ``` Schedule a daily run with cron (adjust paths): ```cron # 03:00 daily: sample the next 24h, write a dated result 0 3 * * * cd ~/atproto-nl/website && uv run scripts/estimate-nl-users.py 86400 "nl-$(date +\%F).json" ``` Averaging several daily results smooths out day-to-day and time-of-day variation. ## nl-stats-aggregate.py Unions the feeder `.dids` files into the public `nl-stats.json` the `/stats` page reads. ```sh uv run scripts/nl-stats-aggregate.py [--dir DIR] [--out nl-stats.json] uv run scripts/nl-stats-aggregate.py --self-test ``` Each feeder writes a `<source>.dids` file (one DID per line) into a shared private directory: `nl-live.json.dids` (Dutch posters), `nl-handles.dids` (`.nl` handles), `starterpack.dids`, `sifa-nl.dids`. The aggregator deduplicates them into a singl…