Skip to content

About

Service for exposing and capturing archives of Gathering.org

Topics

Resources

Stars

0 stars

Watchers

8 watching

Forks

Repository files navigation

The Gathering - Archive

The archive of The Gathering's websites, from 1996 on, served at https://archive.tg.no. archive.tg.no/tgYY opens a year: /tg00 is the 2000 site, /tg26 the 2026 one. All captures of tg.no: archive.tg.no

  • TG96 to TG20 are copies of the old sites' files, served as they are.
  • TG21 and later are web archives (WARC files), replayed by pywb.

Built on the Webrecorder tools:

  • pywb: replays WARC archives in a Wayback-style web interface
  • browsertrix-crawler: crawls a site into WARC files

This repo is the tooling. The archives themselves live in separate repos, one per year, for example go-archive-tgno for tg.no (WARC files in Git LFS). years.yaml lists every year: its repo, and for the WARC years the URL and time a visit starts at.

Quick start

Requires Docker with Compose (and Git LFS for the archive repos).

cp env.example .env     # then edit, see below
./archive serve         # http://localhost:8080

.env settings:

Variable Meaning
ARCHIVE_DIR Directory containing collection folders, for example your clone of go-archive-tgno (which contains tgno/). Default ./collections.
ARCHIVES Which years to fetch: paths such as tg05, or collections such as tgno (TG25 and later). Empty means every year, like production. Years already in the data volume stay served.
GITHUB_TOKEN Read-only token for the private repos of TG96 to TG20, for example from gh auth token.
ALLOW_LFS_DOWNLOAD 1 to download WARC years that are not in ARCHIVE_DIR from Git LFS.

A collection with a non-empty ARCHIVE_DIR/<name>/archive is served from there, so a new crawl can be checked before it is pushed. Everything else is fetched from the repo years.yaml names, into the Docker volume data; later runs fetch only repos that changed. WARC files from GitHub count against the org's Git LFS quota (tgno alone is several GB), so locally a WARC year is only downloaded with ALLOW_LFS_DOWNLOAD=1. Otherwise its line in the log says so.

Try for example http://localhost:8080/tg26/, http://localhost:8080/tg05/, or http://localhost:8080/all/*/https://www.tg.no/, which lists every capture.

./archive serve tg24 tgno overrides ARCHIVES for one run. Variables set in the environment take precedence over .env, e.g. ARCHIVE_DIR=/tmp/x ./archive publish ....

Running a crawl

./archive crawl --label tg27-opening      # full crawl, config tgno.yaml
./archive crawl --label test -- --limit 10  # arguments after -- go to the crawler
./archive crawl --config tg24             # a historical config

Add --watch to follow a crawl in the browser at http://localhost:9037. It is the crawler's built-in screencast: a grid of live screenshots, one per worker. Useful for a quick check that pages actually load; the log output remains the better source for details.

Each crawl runs in its own staging directory work/<timestamp>-<label>/ (gitignored). Nothing is written to the archive repo while crawling.

Stopping and resuming

A crawl can be stopped at any time (Ctrl-C, or docker stop): the crawler saves its state before exiting. Continue it later with:

./archive crawl resume            # the newest unfinished crawl
./archive crawl resume work/<dir> # a specific one
./archive crawl status            # list crawls and their progress

Resume uses the saved state file, and reuses the config and the extra crawler arguments (such as --limit) from the original command. New WARCs are added to the same crawl directory, so publish it once, when it is finished.

Resume works from the crawl directory in work/, so it needs the same machine and the directory kept. If the crawler was killed hard (docker kill, power loss) it resumes from its last periodic save and crawls the pages after that again, which gives duplicate captures but no gaps.

publish refuses an unfinished crawl; --force publishes what exists.

When the crawl has finished:

./archive publish work/<timestamp>-<label>

This copies the new WARC files into ARCHIVE_DIR/tgno/archive/ (never overwriting existing ones) and writes a small record of the crawl to ARCHIVE_DIR/tgno/records/<crawl>/, built from files the crawler already produces:

  • the crawler's state file (*.yaml): the config as run, plus the finished URLs,
  • pages.jsonl and extraPages.jsonl: every crawled page with title and status,
  • record.json: what the others don't say: label, config name, crawler image digest, commit of this repo (and whether it had uncommitted changes), and extra crawler arguments.

Then commit and push in the archive repo (*.warc.gz is tracked by Git LFS). Logs, browser profile and indexes are not copied; the sync builds the index from the WARCs.

Milestone crawl checklist

  1. git pull in the archive repo, git pull here.
  2. ./archive crawl --label <milestone>; wait for it to finish.
  3. ./archive publish work/<dir>.
  4. ./archive serve tgno and spot check key pages (front page, schedule, map, a few sub pages).
  5. Commit only the new WARC files and the record in the archive repo, message like feat: tg27 opening crawl, and push.

Crawl configurations

browsertrix-crawler/configs/tgno.yaml is the current config for tg.no. Older configs (tg22, tg23, tg24, go-example) are kept for reference in browsertrix-crawler/configs/archive/, see the README there. Adding a new target: copy a config, set collection: and use ./archive crawl --config <name>.

Options are documented in the browsertrix-crawler docs.

Adding a year

One entry in years.yaml, see docs/adding-a-year.md.

How the archive service works

Three parts, the same locally (docker-compose.yml) and on archive.tg.no:

  • web (web/Dockerfile, nginx): the landing page, the static years from the data volume, and /all/ and /static/ passed to pywb. /tgYY/... of a WARC year redirects to /all/<time>/<url>, and pywb's old links (/tgno/<time>/<url>, /tg24/<time>/<url>) to the same under /all/. Its config and landing page are made from years.yaml by web/gen.py when the image is built. Rules from the old server, for one year each, are in web/years/.
  • pywb (wayback/Dockerfile, uwsgi): replays the WARC years from the data volume. Collection all searches every collection. It adds wayback/static/archive-fixes.js to every replayed page: on gathering.org (TG21 to TG24) links load whole pages, which replay, and the cookie question is answered. Its banner shows The Gathering's logo, which links to the front page (ui in wayback/config.yaml).
  • sync (the pywb image, python3 /app/sync.py): fills the data volume from the repos in years.yaml and builds the WARC indexes. It reads a repo only when its newest commit or the year's rules changed. Static years leave out videos, sound, archives and PHP, which web answers with 410, and any other file of 5MB or more, which is a 404. Images and PDFs are kept up to 30MB, as pages show them. See the top of wayback/sync.py.

GitHub Actions builds both images on pushes to main and publishes them to ghcr as go-archive and go-archive-web, each tagged main and with the commit.

Known issues and notes

See docs/debugging.md for crawler hangs on Mac (Colima), the diskUtilization workaround, leftover state between crawl runs, consent dialogs showing up in archived pages (browser profiles), and useful queries.

About

Service for exposing and capturing archives of Gathering.org

Topics

Resources

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages