<span class="mw-page-title-namespace">User</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">M-O</span>
Fabrice P. Lauss𝕪's Web
(Redirected from M-O)

M-O

M-O is this wiki's tidying robot—a small program, ~/bin/M-O, that sweeps the local wiki for the little messes that accumulate on their own. It cleans them. It is named after the cleaning bot of WALL-E, and shares its single-mindedness about foreign contaminants.

What it does (so far)

Task What it cleans
redirects a double redirect A → B → C is repointed straight at C (the chain's fragment is kept; loops and self-redirects are reported, never "fixed")
wz <wz tip="">…</wz> renders a tooltip with nothing in it; the tag pair goes and its content stays. A tag carrying tagtotip is left alone, and nothing inside <nowiki>, <pre>, <syntaxhighlight> or a comment is ever touched — a page may be describing the mess rather than suffering from it
math a line starting with a space is a <pre>, whatever it holds—inside a display that is fatal, since it cuts \begin{align} from its \end{align} and the TeX stays on the page as typed. A tab does not trigger the pre rule, so the whole block is indented by one: not a character of the maths changes and the & alignment is kept. A block carrying list markup is reported, never tabbed—:$$...$$ is a <dd>, and a tab in front of it would leave the colon showing. A leading | only counts inside a {|...|}: everywhere else it is a modulus, not a table cell, and a page merely naming a display inside <tt> or <code> is not read as having one
primes f''(x) is a second derivative to a physicist and an <i> to MediaWiki, which wins: the TeX reaches MathJax with HTML inside it and the whole display fails, silently. An empty group breaks the pair for the wiki parser and is invisible to TeX, so f'{}'(x) renders exactly as intended. Only inside maths, and only where the primes follow something (f'', (1/\cos z)''''')—in Lua and JavaScript an '' is an empty string and always follows a space, ( or =, which is the whole difference between a derivative and (args.titlestyle or '')
nbsp a ~ that joins two words outside maths is $\mathrm{\LaTeX}$'s tie, which wikitext does not know: Eq.~\eqref{...} prints a literal tilde. It becomes a real non-breaking space (U+00A0, which MediaWiki emits as &amp;#160;). A ~ with a space before it is approximately (~5000) and is left alone, as is every ~ inside maths, inside a URL, and inside any {{...}} call—#display_map: uses ~ as a field separator and a space there would kill the marker

The list is meant to grow: a new rule is one function plus a decorator, and the recipe sits in a comment at the foot of the file.

Why its edits carry old dates

Tidying is not activity. M-O never writes through a normal edit: every change goes through silent-lwedit, which files the new text as a revision carrying the page's existing timestamp. The footer's "last modified on …" does not move, Special:RecentChanges does not stir, and the history still records the change under an honest summary. This is why Special:Contributions/M-O reads as if the robot had been at work since 2015: each edit is dated by the page it cleaned, not by the day M-O ran.

The cost of that silence is that llw2lw cannot find these edits in RecentChanges either, so silent-lwedit lists every title it writes in ~/.silent-lwedit-manifest, and llw2lw folds that file into each push. M-O itself never touches laussy.org.

Running it

M-O                    # dry run: report what is dirty, write nothing
M-O --go               # clean
M-O --list             # the tasks
M-O -t wz --diff       # one task, with full diffs
M-O --limit 5 --go     # touch at most five pages

It is a dry run unless told otherwise, and it skips loudly rather than guess: a page M-O is unsure about is a page for me.

History

  • First run on 9 August (2026): 10 double redirects and 250 pages of empty tooltips, no date moved.