Forum import: archived comments posted under their original author names

One account per original author (nickname = name as signed on the old
site, group 'Original site'), display-name driver 'museum' keeps the
brackets; --replace re-imports threads without real replies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 22:03:07 +02:00
co-authored by Claude Opus 5.5
parent e9fb8f2c6e
commit 696dfe5e77
12 changed files with 167 additions and 26 deletions
+13 -6
View File
@@ -14,12 +14,19 @@ frame.
- `../oc/scripts/06_forum.py` writes `import/machines.json`: one entry per machine with its
archived comments, oldest first.
- `php flarum oc:import` creates one discussion per machine: an opening post linking to the
museum page, then one post per archived comment, all by the user `Archive`, with the original
author and date at the top of each post and the original date as the post date. Discussions go
- `php flarum oc:import` creates one discussion per machine: an opening post by the user
`Archive` linking to the museum page, then one post per archived comment, dated as the
original. Each comment is posted by an account standing for its original author, shown under
the name used on the old site ("darius (croatia)"); the same name on several machines is one
account. These accounts are in the group "Original site" (a badge on their posts), have a
random password and an undeliverable address, so nobody can log in as them. Discussions go
under three tags (Computers, Consoles, Pongs) that are hidden from "All discussions".
- Original names are stored as nicknames (Nicknames extension, which must be enabled) and shown
by the display-name driver `museum` of this extension, which the import selects: the stock
nickname driver would remove the brackets.
- The command records what it imported (table `oc_threads`) and skips it on later runs, so it
can be run again when new machines arrive. It writes the map machine → discussion to
can be run again when new machines arrive. `--replace` deletes and re-imports the imported
threads that have no reply from a real member (their thread numbers change). It writes the map machine → discussion to
`forum.json`.
- Copied to `../data/forum.json`, that map makes `make content` give every machine a Comments
tab pointing at its thread (`forum_thread` in the page front matter); the old comments are
@@ -72,8 +79,8 @@ are never served. This layout is tested in the local image.
over SSH, as `http`, in the forum folder: `php flarum install --file=install.yml` (format in
`docker/entrypoint.sh`). Do not leave the folder online uninstalled: whoever opens the
installer first becomes its administrator.
5. Enable the extensions Embed and "Old-Computers museum" (admin panel, or
`php flarum extension:enable flarum-embed` and `oc-museum`). Tags is enabled by default.
5. Enable the extensions Nicknames, Embed and "Old-Computers museum" (admin panel, or
`php flarum extension:enable` with `flarum-nicknames`, `flarum-embed`, `oc-museum`). Tags is enabled by default.
6. In the admin panel: e-mail settings (registration confirms addresses by e-mail), and a spam
filter extension. Schedule a database dump.
7. Import, from a shell on the server (SSH, or a one-off Task Scheduler script run as `http`),