Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Wiki.tetrain.com Runbook
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 10.3 Batch-apply the client's markings === Client returned the CSV with 468 of 637 rows marked <code><nowiki>Y</nowiki></code>/<code><nowiki>y</nowiki></code>, each with a filled-in reason. Rather than 468 separate SSH round-trips, wrote a one-off maintenance script (<code><nowiki>BatchMarkOutdated.php</nowiki></code>, dropped into <code><nowiki>/var/www/wiki/maintenance/</nowiki></code> alongside core scripts, run once, then deleted) that loads a JSON <code><nowiki>{title, reason}</nowiki></code> list built from the CSV and, for each page: * resolves the title (namespace prefix already baked into the CSV's URL column from 10.2's query, so <code><nowiki>Category:</nowiki></code>/main-namespace handling is correct going in β no re-lookup needed), * skips it if the text already contains <code><nowiki>{{Outdated</nowiki></code> (idempotent on re-run), * prepends <code><nowiki>{{Outdated|reason=<csv reason>|date=2026-07}}</nowiki></code> and saves via <code><nowiki>WikiPage::newPageUpdater()</nowiki></code> / <code><nowiki>saveRevision()</nowiki></code> (the same underlying API <code><nowiki>edit.php</nowiki></code> itself calls, just invoked in-process for all 468 rows in one PHP bootstrap instead of 936 separate CLI invocations). <pre> <nowiki> php maintenance/BatchMarkOutdated.php --file=/var/www/wiki/maintenance/outdated_batch.json --date=2026-07 # Done: 465, already-tagged: 3, missing: 0, failed: 0 # (3 "already-tagged" were a 3-row test slice run first to confirm the script before the full batch) </nowiki> </pre> '''Verify''': spot-checked several pages via <code><nowiki>getText.php</nowiki></code> and live in-browser (computed style <code><nowiki>color: rgb(192, 57, 43)</nowiki></code>, <code><nowiki>font-weight: 700</nowiki></code>, <code><nowiki>font-size: 22px</nowiki></code> β matches Template:Outdated exactly); banner text includes each page's specific client-supplied reason and the flag date. ----
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)