User:SgtLionBot/dandwikimaintenance.sh

From D&D Wiki

Jump to: navigation, search

If we had an up-to-date MediaWiki, you wouldn't need to watch this script and constantly enter the dang bot password, because we'd have session management. Or you can configure a password file from config2.py as I have done but beware ye plaintext passwords.

Currently, most maintenance tasks are disabled as I run them manually to smooth out the kinks and I don't automate a big monster, but over time they will be enabled and such changes will be reflected here.

hourlymaint.sh[edit]

#!/bin/sh

#Fix de redirects
python /home/sgtlion/core_stable/pwb.py redirect.py double -always -start
python /home/sgtlion/core_stable/pwb.py redirect.py broken -always -delete -start

#Convert abandoned templates untouched for a year into delete
#python pwb.py replace.py -links:User:SgtLion/TimeUpAbandoned -summary "Abandoned time up." -regex "{{abandoned([^}]+)}}" "{{delete\1 - **[[Abandoned]] and untouched for over a year as of ~~~~**}}"

#Dead URL checking
#python pwb.py weblinkchecker.py -repeat #Creates report file of links that have been dead since last check
#python pwb.py weblinkchecker.py -start #Updates list of links that require checking, and logs them to be checked on -repeat

#Protects - (Potential to disturb protection that's exclusive? Commented out as I consider that.)
#python pwb.py protect.py -category:Featured_Article -edit:autoconfirmed -move:autoconfirmed
#python pwb.py protect.py -category:Quality_Article -edit:autoconfirmed -move:autoconfirmed
#python pwb.py protect.py -category:Disambiguation -edit:autoconfirmed -move:autoconfirmed

#Most common misspellings (limited to recent 1000 pages to avoid it taking 9999 years)
#python pwb.py replace.py -start -recentchanges:1000 -regex "([\|\= \(\n][sS])orceror([ \,\.\)\[\]\n])" "\1orcerer\2" "archetype" "subclass" "Archetype" "Subclass" "archetypes" "subclasses" "Archetypes" "Subclasses"

python /home/sgtlion/core_stable/pwb.py replace.py -cat:! -summary:"Correcting invalid IRR parameter" "Missing [[5e Race Design Guide#Referencing|references]] in several places." "" " and remember the wiki uses the American English over British" "" " Remember the wiki uses the American English over British." "" "{{wording|}}" "" "{{wikify|}}" ""

dailymaint.sh[edit]

#!/bin/sh

#Convert intra-wiki external links into [[ ]] links - (Needs manual testing to ensure it doesn't wreck stuff but I set this loose)
#python pwb.py replace.py -recentchanges:200 -regex "https?\:\/\/(www.)?dandwiki.com\/wiki\/([^ ]+)" "[[\2]]"
#                                 Replace - http(or https):// www.(or not)dandwiki.com/wiki/(anything but a space) with [[(anything but a space)]]

#Most common misspellings (limited to recent 200 recently changed pages) - (The edit spam the manual pairs would cause is currently not worth the few misspellings it addresses, I'll want to expand this to at least 100+ common replacement pairs before enacting, which will take some manual testing. Consider possibly category-specific replacements? Or Template-transclusion specific replacements, such as {{5e Spell.)
###python pwb.py replace.py -automaticsummary -start -recentchanges:1000 -regex "([\|\= \(\n][sS])orceror([ \,\.\)\[\]\n])" "\1orcerer\2" "archetype" "subclass" "Archetype" "Subclass" "archetypes" "subclasses" "Archetypes" "Subclasses"

#For misspellings, see [[D%26D_Wiki:Misspellingsregex]], or [[D%26D_Wiki:Misspellings]] -(A long time before I can always this. Takes some refinement.)
python pwb.py replace.py -automaticsummary -pairsfile:mispelauto.txt -cat:User -ns:0 -regex -exceptinsidetag:comment -exceptinsidetag:pre

#Articles labelled as SRD in Main Namespace
python pwb.py replace.py -cat:SRD -ns:0 "{{SRD Class Footer}}" "[[Category:3.5e]]\n[[Category:User]]\n[[Category:Class]]" "[[Category:SRD]]" "[[Category:User]]"

#Convert abandoned templates untouched for a year into delete
python pwb.py replace.py -summary "Abandoned time up." -links:User:SgtLion/TimeUpAbandoned -regex "{{abandoned([^}]+)}}" "{{delete\1 - **[[Abandoned]] and untouched for over a year as of <nowiki>~~~~**}}"

Other & Notes[edit]

We need to implement this. Randomsign page should be in the style of * ~~~~\n* ~~~~ etc. This page I believe should be hardcoded manually, annoyingly. Template:Welcome should be set up and Template:WLE should as on WikiCommons. Currently welcomes users that are >12 hours old, with 2+ edits. Badwords also configurable.

  • python pwb.py welcome.py -edit:2 -break -offset:00000000120000 -quiet -random -savedata

Used Pages[edit]

Home of user-generated,
homebrew pages!


Advertisements: