No description
Find a file
2026-05-14 10:14:59 +01:00
add_links Fix remaining 'Find Link' references and improve error messages 2026-05-11 14:05:35 +01:00
frontend Initial commit 2023-10-04 12:56:21 +01:00
static Redesign UI and fix several bugs 2026-05-11 11:30:12 +01:00
templates Render newlines in error messages as <br> instead of literal \n 2026-05-11 17:04:08 +01:00
.gitignore Add static/bootstrap to .gitignore 2023-11-26 14:10:00 +00:00
add_front_end_libraries.py Initial commit 2023-10-04 12:56:21 +01:00
cmdline.py Tidy code for building list of examples 2023-12-09 18:43:56 +00:00
package.json Initial commit 2023-10-04 12:56:21 +01:00
README.md Add README.md 2026-05-11 15:22:53 +01:00
vite.config.js Initial commit 2023-10-04 12:56:21 +01:00
web_view.py Guard oauth callback against missing session tokens 2026-05-14 10:14:59 +01:00

Missing Link

A Wikipedia tool that finds articles which mention a topic by name but don't link to it, then lets you add the missing wikilink directly from your browser.

Live at: https://edwardbetts.com/missinglink/

How it works

  1. Enter a Wikipedia article title.
  2. The tool searches Wikipedia for articles that mention the title but don't include a wikilink to it.
  3. For each candidate, a diff shows the proposed edit in context.
  4. Save the edit to Wikipedia with one click (requires a Wikipedia account), or skip to the next candidate.

Redirect targets are handled automatically — if the title is a redirect, the tool produces a piped link (e.g. [[Possession of stolen goods|handling stolen goods]]) and excludes articles that already link to the redirect target.

Setup

Dependencies

pip install flask requests requests-oauthlib simplejson flipflop

Configuration

Copy config/default.py and add your Wikipedia OAuth credentials:

SECRET_KEY = 'your-flask-secret-key'
CLIENT_KEY = 'your-oauth-consumer-key'
CLIENT_SECRET = 'your-oauth-consumer-secret'

Register an OAuth 1.0a consumer at https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose

Running locally

python web_view.py

The app listens on http://0.0.0.0:8000.

Running under Apache mod_fcgid

The run.fcgi entry point is used by Apache. Touch it to reload the app after code changes:

touch run.fcgi

Project layout

web_view.py          Flask application and routes
add_links/
    api.py           Wikipedia API client (read, search, diff)
    match.py         Link-finding and wikitext editing logic
    core.py          Search and candidate ranking
    mediawiki_oauth.py  OAuth session management
    mediawiki_api.py    Authenticated write API calls
templates/           Jinja2 HTML templates
static/              CSS and assets