User:SOTO/bot tricks

= Categories =

Step 1
 python add_text.py -cat:"category" -text:"" -pt:1 -except:"New category"

Step 2
 python replace.py -cat:"New category" -regex "\[\[Category:(New category)\]\]\r\n([\s\S]*)\r\n\[\[Category:(.*?)\]\]" "\2\n\n" -pt:1

Adding FTRW category only if contains wikipediainfo
 python replace.py -catr:"Example" -regex "\{\{[Ww]ikipediainfo([\s\S]*)\[\[Category:(.*?)\]\]" "{{wikipediainfo\1\n" -excepttext:"Example from the real world" -pt:1

= General =

Piped italics
 python replace.py -regex "\[\[(.*?) \((.*?)\)\|\1\]\]" "\1" "\[\[(.*?)\|\1\]\]" "\1" -summary:"Cosmetic changes" -pt:1 -start:!

= Videos =

Step 2
Find-and-replace list into a usable format. python replace.py "" "" -pt:1 -page:"File:Video name 1" -page:"File:Video name 2" You may have to handle videos with double quotation marks in their titles, manually.