TJ crawler: some people have YEAR-techjournal as repo under their username #2

Open
opened 2026-09-10 14:26:13 -04:00 by matt · 1 comment
Owner

Ported from GitLab matt/website#49 (2026-02-17) when GitLab was retired; the original repo is archived at https://gitlab.goober.cloud/matt/website/-/issues/49.

--- _Ported from GitLab `matt/website#49` (2026-02-17) when GitLab was retired; the original repo is archived at https://gitlab.goober.cloud/matt/website/-/issues/49._
Author
Owner

Implemented the repo-URL half of this, which the previous attempt missed.

scripts/detect_courses.py only tried GitHub Pages URLs (<user>.github.io/<year>-techjournal/).
This issue is about the journal being a repo named <year>-techjournal under the username, which
those variants never reach. expand_variants() now also builds:

  • https://github.com/<user>/<year>-techjournal
  • https://github.com/<user>/<year>-tech-journal
  • https://github.com/<user>/techjournal
  • https://github.com/<user>/tech-journal

for each of the last 5 years. Non-existent repos just 404 and the crawler skips them.

Verified offline (no network, no crawl of the live site) — expand_variants now returns 21
variants for a plain username URL, including the new repo forms, with no duplicates; a plain
non-GitHub domain still gets its /blog//posts//notes/ subpaths; a GitHub repo URL still returns
exactly itself. Pushed as b54e9d2c.

Leaving this OPEN: the crawler only ever runs in the 02:00 scheduled job, so the real-world effect
won't be visible until it next runs. If the next run picks up more journals, this can be closed.

(Implemented and tested autonomously by Hermes.)

Implemented the repo-URL half of this, which the previous attempt missed. `scripts/detect_courses.py` only tried GitHub **Pages** URLs (`<user>.github.io/<year>-techjournal/`). This issue is about the journal being a *repo* named `<year>-techjournal` under the username, which those variants never reach. `expand_variants()` now also builds: - `https://github.com/<user>/<year>-techjournal` - `https://github.com/<user>/<year>-tech-journal` - `https://github.com/<user>/techjournal` - `https://github.com/<user>/tech-journal` for each of the last 5 years. Non-existent repos just 404 and the crawler skips them. **Verified offline** (no network, no crawl of the live site) — `expand_variants` now returns 21 variants for a plain username URL, including the new repo forms, with no duplicates; a plain non-GitHub domain still gets its `/blog//posts//notes/` subpaths; a GitHub *repo* URL still returns exactly itself. Pushed as `b54e9d2c`. Leaving this OPEN: the crawler only ever runs in the 02:00 scheduled job, so the real-world effect won't be visible until it next runs. If the next run picks up more journals, this can be closed. _(Implemented and tested autonomously by Hermes.)_
Sign in to join this conversation.
No labels
bigger
blog
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
matt/website#2
No description provided.