{\rtf1\ansi\ansicpg1252\cocoartf2636 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Menlo-Regular; } {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \margl1440\margr1440\vieww13260\viewh11840\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 \f0\b\fs28 \cf0 Uses for Pywikibot \f1\b0 \ based on https://www.mediawiki.org/wiki/Manual:Pywikibot/Scripts\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ul \ulc0 Throttling a script\ulnone \ For safety's sake and to not overload the wiki, you should limit the rate of your API calls. Bot scripts will automatically throttle themselves according to the value of "put_throttle" in user-config.py, but if you are performing an operation by calling a bot script multiple times then you must implement your own external throttle. For working examples, see my .sh scripts.\ \ \ul Category renaming\ulnone \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f2\fs24 \cf0 python pwb.py category move -from:"Art by Okita" -to:"Art by Alex Okita" \f1\fs28 \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ul General text replacement\ulnone \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f2\fs24 \cf0 python pwb.py replace -page:pagetitle "old text" "new text" -summary:"something" \f1\fs28 \ Use "-simulate" to perform a dry-run.\ Add "-always" to save edit without prompting. \ul Not\ulnone using this will allow a -simulate run to show you what changes will actually be made. For working examples of how to use "replace", see my .sh scripts.\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ul \ulc0 Page scope arguments\ulnone \ There are a ton of ways to select which pages to run a Pywikibot script on besides specifying a single page with "-page". Not only are there -cat and -catr (all pages recursively under that cat), but also -ns, -grep, -subpage, -titleregex, -wantedpages, -transcludes, -start (proceeds from that point alphabetically), -imagesused (on a given page), -links (to other pages from a given page), -filelinks (image links on given page), and much more. See "Generator and replace options.txt" for details.}