
M-O is this wiki's tidying robot—a small program, , 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.
~/bin/M-O
| Task | What it cleans |
|---|---|
|
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 tip="">…</wz> renders a tooltip with nothing in it; the tag pair goes and its content stays. A tag carrying 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
|
|
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
|
|
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 renders exactly as intended. Only inside maths, and only where the primes follow something (, )—in Lua and JavaScript an is an empty string and always follows a space, or , which is the whole difference between a derivative and
|
|
a that joins two words outside maths is $\mathrm{\LaTeX}$'s tie, which wikitext does not know: } prints a literal tilde. It becomes a real non-breaking space (U+00A0, which MediaWiki emits as ). A with a space before it is approximately () and is left alone, as is every inside maths, inside a URL, and inside any {{...}} call— 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.
Tidying is not activity. M-O never writes through a normal edit: every change goes
through , 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.
silent-lwedit
The cost of that silence is that cannot find these edits in
RecentChanges either, so llw2lw lists every title it writes in
silent-lwedit, and ~/.silent-lwedit-manifest folds that file into each
push. M-O itself never touches laussy.org.
llw2lw
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.