{\rtf1\ansi\ansicpg1252\cocoartf2578 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \margl1440\margr1440\vieww13440\viewh14100\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 \f0\b\fs28 \cf0 How to Use these Scripts \f1\b0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ These are some helpful scripts written for Pywikibot or for the Bash shell.\ \ To run the .py bot scripts, first {\field{\*\fldinst{HYPERLINK "https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation"}}{\fldrslt install Pywikibot}}. Then 'cd' into the core/ directory and run the command "python pwb.py /path/to/script [arguments for script]". When running a built-in Pywikibot script, you would simply invoke it with "python pwb.py [name of script without suffix] [arguments]", but since these scripts are outside the core/ directory they need full pathname qualification.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ul \ulc0 check_interwiki_links.py\ulnone \ This Python script scans the wikitext of the supplied page, or all the pages in the supplied category, for interwiki links such as [[wp:Example]] and [[wikt:Definition|some word]]. It then tests those links to make sure they're valid and prints a "WARNING:" message if a redirect or 404 is encountered.\ \ Example usage:\ python pwb.py check_interwiki_links -page:"Daodan" (checks a single page)\ python pwb.py check_interwiki_links -cat:"Wiki Support" (checks the whole category recursively)\ \ \ul check_intrawiki_section_links.py\ulnone \ This Python script scans the wikitext of the supplied page, or all the pages in the supplied category, for intrawiki links with section links in them such as [[Konoko#In-game_appearance]]. It then tests those links to make sure they're valid and prints a "WARNING:" or "ERROR:" message if a problem is encountered. "ADVICE:" messages are printed when a link cannot be tested because transclusion is being used to construct it.\ \ Example usage: the syntax is the same as for check_interwiki_links.py, so see its usage above.\ \ \ul find_external_images.py\ulnone \ This Python script scrapes the HTML of the supplied category of pages and alerts the user to external images so he can consider localizing them to the wiki. Special attention is drawn to images hosted elsewhere on oni2.net. This script isn't totally finished and the argument-handling code is in a bit of disarray, but in theory it supports optionally showing inline and/or non-embedded external image links, as well as accepting an individual page as an argument.\ \ Example usage:\ python pwb.py find_external_images -justshown -cat:"Category:Real World"\ \ \ul drive_https_upgrade.sh\ulnone \ This Bash script was designed to take a TXT report from a Validate External Links session run \ul without\ulnone the --show-https-upgrades argument and use it to mass-change all the links that wanted an upgrade from HTTP to HTTPS. In such a report, links that wanted an HTTPS upgrade would have the phrase "http->https" in it, so this is what the script uses regex to search for. It edits all such links from the one numbered FIX_START to the one numbered FIX_END. This script served its purpose and probably won't need to be used again, but it has value as a tutorial.\ \ \ul drive_slash_adding.sh\ulnone \ Ditto what I wrote above, except for a ValExtLinks session run without the --show-added-slashes argument. In this case the word "trailing", as in "trailing slash", is looked for. Probably won't need to use this again, but it has some instructional value.}