| 1 |
< |
{\rtf1\mac\ansicpg10000\cocoartf\nisusversion50300 {\*\nisusorigapp Cocoa}{\*\nisusorigdate\yr2023\mo4\dy27\hr12\min11 }{\*\nisussysvers 13.5.0}\deff0 |
| 1 |
> |
{\rtf1\mac\ansicpg10000\cocoartf\nisusversion50401 {\*\nisusorigapp Cocoa}{\*\nisusorigdate\yr2023\mo4\dy27\hr12\min11 }{\*\nisussysvers 26.3.1}\deff0 |
| 2 |
|
{\*\fonttbl |
| 3 |
|
{\f0\fswiss\fcharset77 Helvetica;} |
| 4 |
|
{\f1\fswiss\fcharset77 Helvetica-Bold{\*\falt Helvetica};} |
| 12 |
|
{\s104\snext104 \ltrpar\pardirnatural\ql\widctlpar\sb0\sa0\sl240\slmult1\hyphpar1\li0\lin0\fi0\ri0\rin0 Header;} |
| 13 |
|
{\s105\snext105 \ltrpar\pardirnatural\ql\widctlpar\sb0\sa0\sl240\slmult1\hyphpar1\li0\lin0\fi0\ri0\rin0 Footer;} |
| 14 |
|
{\*\cs106\ul\cf1 Hyperlink;}} |
| 15 |
< |
\defformat {\*\generator Nisus Writer Express 4.3 [0503.0004.01]}{\info {\*\nisusgmtoffset -4:00}{\author Admin}{\creatim\yr2021\mo3\dy7\hr16\min44 }{\revtim\yr2023\mo8\dy14\hr21\min59 }} |
| 15 |
> |
\defformat {\*\generator Nisus Writer Express 4.4.1 [0504.0104.01]}{\info {\*\nisusgmtoffset -4:00}{\author Admin}{\creatim\yr2021\mo3\dy7\hr16\min44 }{\revtim\yr2026\mo3\dy21\hr20\min12 }} |
| 16 |
|
{\*\userprops }\nisusrulerunits0\nisusstatusbar1\nisusareaid1\viewkind4\viewscale100\nisusviewruler1\nisusviewrulerh1\nisusviewrulerv0\nisusviewtoolbar1\nisusviewtooldrawer0\nisusviewtoolswidth0\nisusviewpagenumtype1\nisusviewrulericons0\donotshowcomments1 |
| 17 |
|
{\*\nisusviewsettings\viewkind4\viewscale100 {\nisusnavsettings {\*\visible 0}{\*\width 160}{\*\isOnRightSide 0}{\*\mode toc}{\*\sort location}}{\nisuscommentsettings {\*\visible 0}{\*\showPane 1}{\*\isOnRightSide 0}{\*\width 180}{\*\titlebarInfo 2}{\*\showTextHighlighting 1}{\*\showGutterIcons 1}}{\nisusrevisionsettings {\*\visible 0}{\*\showPane 1}{\*\isOnRightSide 1}{\*\width 180}{\*\titlebarInfo 4}{\*\showTextHighlighting 1}{\*\showGutterIcons 1}}} |
| 18 |
|
{\*\nisusviewsettings\viewkind1\viewscale100 {\nisusnavsettings {\*\visible 0}{\*\width 160}{\*\isOnRightSide 0}{\*\mode toc}{\*\sort location}}{\nisuscommentsettings {\*\visible 0}{\*\showPane 1}{\*\isOnRightSide 0}{\*\width 180}{\*\titlebarInfo 2}{\*\showTextHighlighting 1}{\*\showGutterIcons 1}}{\nisusrevisionsettings {\*\visible 0}{\*\showPane 1}{\*\isOnRightSide 1}{\*\width 180}{\*\titlebarInfo 4}{\*\showTextHighlighting 1}{\*\showGutterIcons 1}}} |
| 19 |
|
\nisusareasplitv0 |
| 20 |
|
{\*\nisuswindow\x128\y96\w613\actualw613\h631 } |
| 21 |
< |
\nshwinv0\nshwpg1\nisusinlinespell0\nisushyphnone\spltpgpar\nisusselectstart2878\nisusselectlength0\fet2\ftnbj\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\pgnstart1\nocolbal \f0 |
| 21 |
> |
\nshwinv0\nshwpg1\nisusinlinespell0\nisushyphnone\spltpgpar\nisusselectstart5068\nisusselectlength0\fet2\ftnbj\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\pgnstart1\nocolbal \f0 |
| 22 |
|
\sectd\endnhere\cols1\ltrsect\colbalsxn0\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\guttersxn0\headery720\footery360\pgncont\pgndec\sxnstarts1\sxnrestart\sxndec |
| 23 |
|
{\header\plain\pard\s104\ltrpar\pardirnatural\ql\widctlpar\f0\fs28 } |
| 24 |
|
{\footer\plain\pard\s105\ltrpar\pardirnatural\ql\widctlpar\f0\fs28 } |
| 26 |
|
by iritscen@yahoo.com}{\fs28 \par }} |
| 27 |
|
{\pard\ltrpar\pardirnatural\ql {\fs28 \par |
| 28 |
|
In the course of maintaining the OniGalore wiki, I have written some Python and Bash shell scripts for Pywikibot. My Bash shell scripts call Python scripts which are bundled with Pywikibot. My Python scripts utilize the Pywikibot API to perform new tasks not covered by the bundled scripts. To run the scripts, first }} |
| 29 |
< |
{\field {\*\fldinst HYPERLINK "https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation"}{\fldrslt {\pard\ltrpar\pardirnatural\ql {\cs106\fs28\ul\cf1 install Pywikibot}}}}{\pard\ltrpar\pardirnatural\ql {\fs28 , then read below for an introduction to each file in the ValBot/ directory.\par |
| 29 |
> |
{\field {\*\fldinst HYPERLINK "https://www.mediawiki.org/wiki/Manual%3APywikibot/Installation"}{\fldrslt {\pard\ltrpar\pardirnatural\ql {\cs106\fs28\ul\cf1 install Pywikibot}}}}{\pard\ltrpar\pardirnatural\ql {\fs28 , then read below for an introduction to each file in the ValBot/ directory.\par |
| 30 |
|
\par |
| 31 |
|
{\ul Bash/}\par |
| 32 |
|
{\f1\b drive_https_upgrade.sh}\par |
| 46 |
|
You are here.\par |
| 47 |
|
\par |
| 48 |
|
{\ul Python/}\par |
| 49 |
< |
In Terminal, 'cd' into the core/ directory and run the command "python pwb.py /path/to/script [arguments for script]". If you were running a built-in Pywikibot script, you could simply invoke it with "python pwb.py [name of script without suffix] [arguments]", but since these {\*\nisusscroll\nisusarea1\xoffset0\yoffset5 } |
| 50 |
< |
scripts that you downloaded are outside the core/ directory they need full pathname qualification.\par |
| 49 |
> |
In Terminal, 'cd' into the core/ directory and run the command "python pwb.py /path/to/script [arguments for script]". If you were running a built-in Pywikibot script, you could simply invoke it with "python pwb.py [name of script without suffix] [arguments]", but since these scripts that you downloaded are outside the core/ directory they need full pathname qualification.\par |
| 50 |
|
\par |
| 51 |
|
{\f1\b check_interwiki_links.py}\par |
| 52 |
< |
This script scans the wiki markup of a given page, or all the pages in a given 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 an "ERROR:" message if the page is not found or if the interwiki link specified a section on that page (e.g. [[wp:Article#References]]) and that section cannot be found.{\nisusselectcaret \par } |
| 52 |
> |
This script scans the wiki markup of a given page, or all the pages in a given 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 an "ERROR:" message if the page is not found or if the interwiki link specified a section on that page (e.g. [[wp:Article#References]]) and that section cannot be found.\par |
| 53 |
|
\par |
| 54 |
|
Usage:\par |
| 55 |
|
python pwb.py path/to/check_interwiki_links.py -page:"Daodan"\par |
| 58 |
|
\par |
| 59 |
|
{\f1\b check_intrawiki_section_links.py}\par |
| 60 |
|
This script scans the wiki markup of a given page, or all the pages in a given category, for intrawiki links that have section links in them such as [[Konoko#In-game appearance]]. It then looks for those sections on the relevant pages and prints an "ERROR:" message if a problem is encountered. "ADVICE:" messages are printed when a link cannot be tested because transclusion is being used to build the link in a way that the script cannot unravel.\par |
| 61 |
< |
\par |
| 61 |
> |
{\*\nisusscroll\nisusarea1\xoffset0\yoffset12 }\par |
| 62 |
|
Usage: The syntax is the same as for check_interwiki_links.py. Adding the argument "-dbg" will print the name of each page as it is being scanned as well as verbose logic explaining how each link is being processed.\par |
| 63 |
|
\par |
| 64 |
|
{\f1\b find_external_images.py}\par |
| 73 |
|
{\f1\b uncapitalize_image_suffixes.py}\par |
| 74 |
|
This script checks all the images on the wiki for capitalized file suffixes (.JPG instead of .jpg, etc.) and renames (i.e., moves) them to non-capitalized versions. Note that any pages linking to the images will need to be corrected manually afterward, but the script will tell you which pages link to each image that it renames.\par |
| 75 |
|
\par |
| 76 |
< |
Usage: Simply invoke the script with no arguments.\par }}} |
| 76 |
> |
Usage: Simply invoke the script with no arguments.x\nisusselectcaret\par }}} |