The website behind pisg.online/undernet: live IRC statistics for many channels, in English and French, with day / week / month / year views, archives, a personal page for everyone, and a privacy policy that tells the truth.
A personal page (the author of this repository, with their consent). The privacy policy page.
This repository is the deployment: the configuration, the pages, the Apache rules and the notes that turn PISG and a few Eggdrop bots into a public service. It is shared so anyone can run the same thing for their own network. Nothing secret is in here, and no one's conversation either.
Two different things, kept apart on purpose
What it is Where it lives Announced in #pisgasPISG the statistics generator (Perl), the navbar, the period and personal-page tools PISG/pisg [PISG] …pisg.online one website that uses PISG: its pages, policy, web server and cron this repository [pisg.online] …pisg-eggdrop the bot scripts: requests, approvals, profiles, patch notes PISG/pisg-eggdrop [PISG] …for GitHub news
- 📊 A page per channel, with a top bar to jump to another channel.
- 🕐 Day, Week, Month, Year buttons, plus last week / last month / last year and a drop-down of every archive. Pages for finished weeks, months and years are written once and never touched again.
- 🌍 English and French, one switch (
EN | FR) that remembers your choice. French pages live under/fr/. - 🙋 A page for every person at
/u/<nick>: totals, streaks, a 12-month activity calendar, hour and week-hour heatmaps, day-of-week and month charts, rank in each channel, who they talk with most, and a few badges. Badges (👑 top of a channel, 🔥 on fire, 🎖️ veteran, 🦉 night owl, 🔗 link sharer…) also show next to nicks in the rankings and on the relation map. Nicks are clickable in the rankings, the top cards, the relation map and the sentences of the page. Counts only: no message text, no hostmask. - 🔒 Privacy first: no cookies, no analytics, nothing loaded from a third party, a clear policy page, an opt-out file.
- 🌗 The usual kit: light and dark mode (dark by default) with a sun/moon slider, a skip link, visible keyboard focus, reduced-motion support, a one-time "no cookies" notice, and Privacy, Terms and Cookie pages in French and English.
- 🪪 Profile cards: rest the mouse on a nick for half a second to get a Discord-style card (avatar, badges, lines, rank, top channels).
- 🤖 Channels by request, approved by hand by an op, so the bot never outgrows its connection.
- 📣 News in IRC: new PISG commits and website changes are said in
#pisg, each with its own tag.
flowchart TD
subgraph IRC
U([people]) --- C[channels]
C --- B1[Eggdrop bot<br/>pisg-eggdrop]
C --- Z[ZNC]
end
B1 -- logs --> L[(/srv/pisg/logs)]
Z -- logs --> ZL[(znc-logs)]
L & ZL --> A[pisg-autoalias.py<br/>merge nicks]
A --> P[pisg-periods.py<br/>slice by period]
P --> G[./pisg<br/>generate pages]
G --> H[(output/*.html)]
H --> U2[pisg-users.py<br/>personal pages]
U2 --> H
H --> W[Apache<br/>clean URLs, CSP]
W --> V([visitors])
R[(git commit)] -- post-commit --> N[announce.txt] --> B1
A cron job runs the four steps in the middle every three hours, one at a time (flock). The pages are plain HTML
files; nothing runs when someone visits. See docs/ARCHITECTURE.md.
| Path | What |
|---|---|
site/home.html |
The front page at the domain root: live numbers, activity charts, the most active people with their badges, the request command, the top channels. EN/FR, light/dark. |
site/commands.html |
All the bot commands, as cards that build the command for you (request, profile, avatar, bio, merge, name shown). EN/FR. |
site/index.html |
Landing page: totals, busiest hours, one row per channel. Reads channels.json made by pisg. EN/FR. |
site/terms.html, site/cookies.html |
Terms of use and cookie / local storage policy, FR and EN, same style as the privacy page. |
site/privacy.html |
The privacy policy page (FR and EN in one file), written for Quebec's Law 25. Rewrite it for your own site. |
config/pisg.cfg.example |
The pisg configuration: theme, languages, includes, ZNC and Eggdrop channels. |
config/apache.conf.example |
Virtual host: clean URLs, /fr/, /u/, security headers. |
config/crontab.example |
The 3-hour job. |
config/optout.cfg.example |
How someone is left out of the statistics. |
bot/pisg-site-notes.tcl |
Eggdrop script: says website changes in the channel. |
scripts/site-announce.sh, hooks/post-commit |
Queue a line for the bot; the hook does it for every commit. |
docs/ |
Architecture, deployment, operations, privacy. |
The generator itself, scripts/pisg-periods.py, scripts/pisg-users.py and scripts/pisg-autoalias.py live in
PISG/pisg.
# 1. PISG and the bot scripts
git clone https://github.com/PISG/pisg.git ~/pisg
git clone https://github.com/PISG/pisg-eggdrop.git
git clone https://github.com/PISG/pisg.online.git
# 2. your configuration
cp pisg.online/config/pisg.cfg.example ~/pisg/pisg.cfg # edit USER, channels, SiteName
cp pisg.online/config/optout.cfg.example ~/pisg/optout.cfg
cp pisg.online/site/index.html pisg.online/site/privacy.html ~/pisg/output/ # then rewrite privacy.html
# 3. a first run, by hand
cd ~/pisg && python3 scripts/pisg-periods.py && ./pisg && PISG_BASE_URL=/pisg python3 scripts/pisg-users.py
# 4. the web server and the schedule
sudo cp ~/pisg.online/config/apache.conf.example /etc/apache2/sites-available/stats.conf # edit it
crontab ~/pisg.online/config/crontab.example # edit USERThe long version, with users, permissions and certificates: docs/DEPLOYMENT.md.
The channels are logged, the logs are never shared, and what is public is statistics: nicks, counts, hours, quotes,
topics and kicks, never an ident@host. Personal pages carry noindex, are only made for people with at least 20 lines,
and only name the nicks the person gave themselves. Anyone can be removed with one line in optout.cfg. The reasoning,
and the checklist behind the policy page, are in docs/PRIVACY-LAW25.md. This is a description of
what the software does, not legal advice.
[PISG] some-dev: Fix the lone wolf role https://github.com/PISG/pisg/commit/abc1234
[pisg.online] Privacy policy: mention personal pages
The first kind comes from the GitHub API (pisg-eggdrop), the second from git commit in this website's own repository.
Change one thing, the right tag appears.
GPL-2.0, like PISG. The privacy text is provided as an example; adapt it to your situation before publishing.