Tech, Bureaucrats, emailconfirmed, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Suppressors, Administrators, threadmoderator
118,923
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
==== Step 1 ==== | ==== Step 1 ==== | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py add_text -cat:"category" -text:"[[Category:New category]]" -pt: | python pwb.py add_text -cat:"category" -text:"[[Category:New category]]" -pt:1 -except:"New category" | ||
</pre> | </pre> | ||
==== Step 2 ==== | ==== Step 2 ==== | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -cat:"New category" -regex "\[\[Category:(New category)\]\]\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" -pt: | python pwb.py replace -cat:"New category" -regex "\[\[Category:(New category)\]\]\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" -pt:1 | ||
</pre> | </pre> | ||
'''Absolute bottom''' | '''Absolute bottom''' | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -cat:"New category" -regex "\[\[Category:(New category)\]\]\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" "\[\[Category:(New category)\]\]\n\[\[Category:(.*?)\]\]" "[[Category:\2]]\n[[Category:\1]]" -pt: | python pwb.py replace -cat:"New category" -regex "\[\[Category:(New category)\]\]\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" "\[\[Category:(New category)\]\]\n\[\[Category:(.*?)\]\]" "[[Category:\2]]\n[[Category:\1]]" -pt:1 | ||
</pre> | </pre> | ||
=== Bringing a category to no.1 position === | === Bringing a category to no.1 position === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -cat:"Target category" -regex "\[\[Category:(.*?)\]\]\n*([\s\S]*)\n\[\[Category:(Target category)\]\]" "[[Category:\3]]\n[[Category:\1]]\n\2" "\[\[Category:(.*?)\]\]\n\[\[Category:(Target category)\]\]" "[[Category:\2]]\n[[Category:\1]]" -pt: | python pwb.py replace -cat:"Target category" -regex "\[\[Category:(.*?)\]\]\n*([\s\S]*)\n\[\[Category:(Target category)\]\]" "[[Category:\3]]\n[[Category:\1]]\n\2" "\[\[Category:(.*?)\]\]\n\[\[Category:(Target category)\]\]" "[[Category:\2]]\n[[Category:\1]]" -pt:1 | ||
</pre> | </pre> | ||
Line 22: | Line 22: | ||
In this case, it's written for comics specifically: | In this case, it's written for comics specifically: | ||
<pre style="background:black!important;color:white;font-size:.8em"> | <pre style="background:black!important;color:white;font-size:.8em"> | ||
python pwb.py replace -regex "epcount( *?)=( *?)([^\n]*?)\|featuring" "epcount\1=\2\3\n|featuring" "epcount( *)=( *)(.*?)\}\}" "epcount\1=\2\3\n}}" "\|prev ( *?)=( *)(.*?)\n([\s\S]*)\n\|epcount=(.*?)\n" "|epcount\1= \5\n|prev \1=\2\3\n\4\n" "epcount=([^ ].*?)\n" "epcount = \1\n" "\|prev( *?)=( *?)(.*?)\n(\s\S]*)\n\|epcount ( *?)= ( *?)(.*?)\n" "|epcount \5= \7\n|prev\1=\2\3\n\4\n" "\|series( *)=( *)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" "epcount( *)=( *)(.+)\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "epcount\1=\2\3\n\4\n[[Category:\5]]\n[[Category:{{subst:#switch:\3|1=One|2=Two|3=Three|4=Four|5=Five|6=Six|7=Seven|8=Eight|9=Nine|10=Ten|11=Eleven|12=Twelve|#default=X}} part comics]]" -excepttext:" part comics\]\]" -catr:"Comic stories" -summary:"Re-organising and adding category" -pt: | python pwb.py replace -regex "epcount( *?)=( *?)([^\n]*?)\|featuring" "epcount\1=\2\3\n|featuring" "epcount( *)=( *)(.*?)\}\}" "epcount\1=\2\3\n}}" "\|prev ( *?)=( *)(.*?)\n([\s\S]*)\n\|epcount=(.*?)\n" "|epcount\1= \5\n|prev \1=\2\3\n\4\n" "epcount=([^ ].*?)\n" "epcount = \1\n" "\|prev( *?)=( *?)(.*?)\n(\s\S]*)\n\|epcount ( *?)= ( *?)(.*?)\n" "|epcount \5= \7\n|prev\1=\2\3\n\4\n" "\|series( *)=( *)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" "epcount( *)=( *)(.+)\n([\s\S]*)\n\[\[Category:(.*?)\]\]" "epcount\1=\2\3\n\4\n[[Category:\5]]\n[[Category:{{subst:#switch:\3|1=One|2=Two|3=Three|4=Four|5=Five|6=Six|7=Seven|8=Eight|9=Nine|10=Ten|11=Eleven|12=Twelve|#default=X}} part comics]]" -excepttext:" part comics\]\]" -catr:"Comic stories" -summary:"Re-organising and adding category" -pt:1 | ||
</pre> | </pre> | ||
[[:Category:X part comics]], here, acts as a failsafe measure to check for exceptions. Adding in [[:category:Comics with thirteen or more parts]], which follows an unusual naming format, would be laborious (and not worth the effort, in this case). | [[:Category:X part comics]], here, acts as a failsafe measure to check for exceptions. Adding in [[:category:Comics with thirteen or more parts]], which follows an unusual naming format, would be laborious (and not worth the effort, in this case). | ||
Line 28: | Line 28: | ||
=== Adding FTRW category only if contains <nowiki>{{</nowiki><code>wikipediainfo</code>}} === | === Adding FTRW category only if contains <nowiki>{{</nowiki><code>wikipediainfo</code>}} === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -catr:"Example" -regex "\{\{[Ww]ikipediainfo([\s\S]*)\[\[Category:(.*?)\]\]" "{{wikipediainfo\1[[Category:\2]]\n[[Category:Example from the real world]]" -excepttext:"Example from the real world" -pt: | python pwb.py replace -catr:"Example" -regex "\{\{[Ww]ikipediainfo([\s\S]*)\[\[Category:(.*?)\]\]" "{{wikipediainfo\1[[Category:\2]]\n[[Category:Example from the real world]]" -excepttext:"Example from the real world" -pt:1 | ||
</pre> | </pre> | ||
Line 34: | Line 34: | ||
=== Locations visited by the good Doc === | === Locations visited by the good Doc === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
pwb.py replace "-cat:Example" "-regex" "\[\[Category:Locations visited by the(.*?)Doctor\]\]" "[[Category:Example visited by the\1Doctor]]" "-pt: | pwb.py replace "-cat:Example" "-regex" "\[\[Category:Locations visited by the(.*?)Doctor\]\]" "[[Category:Example visited by the\1Doctor]]" "-pt:1" | ||
</pre> | </pre> | ||
Line 41: | Line 41: | ||
=== Implementing <nowiki>{{</nowiki><code>w/wi</code>}} === | === Implementing <nowiki>{{</nowiki><code>w/wi</code>}} === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "''\[\[(:wikipedia|wikipedia):(.*?)\|(.*?)\]\]''" "{{wi|\2|\3}}" "\[\[(:wikipedia|wikipedia):(.*?)\|(.*?)\]\]" "{{w|\2|\3}}" "\{\{(w|wi)\|(.*?)\|\2\}\}" "{{\1|\2}}" "\{\{(w|wi)\|(\w)(.*?)\|(\w)\3\}\}" "{{\1|\4\3}}" "\{\{(w|wi)\|(\w)(.*?)\|(\w)\3(s)\}\}" "{{\1|\4\3|\4\3s}}" -summary:"Converting to {{w}} and {{wi}}" -start:! -pt: | python pwb.py replace -regex "''\[\[(:wikipedia|wikipedia):(.*?)\|(.*?)\]\]''" "{{wi|\2|\3}}" "\[\[(:wikipedia|wikipedia):(.*?)\|(.*?)\]\]" "{{w|\2|\3}}" "\{\{(w|wi)\|(.*?)\|\2\}\}" "{{\1|\2}}" "\{\{(w|wi)\|(\w)(.*?)\|(\w)\3\}\}" "{{\1|\4\3}}" "\{\{(w|wi)\|(\w)(.*?)\|(\w)\3(s)\}\}" "{{\1|\4\3|\4\3s}}" -summary:"Converting to {{w}} and {{wi}}" -start:! -pt:1 | ||
</pre> | </pre> | ||
Line 47: | Line 47: | ||
The example here is for adding <code>epcount</code>, where it is missing, for one-part comic stories. (It begins with the category, excludes all pages where <code>epcount</code> is already present, then neatly places the information in the relevant section, with consistent spacing for the page in question.) | The example here is for adding <code>epcount</code>, where it is missing, for one-part comic stories. (It begins with the category, excludes all pages where <code>epcount</code> is already present, then neatly places the information in the relevant section, with consistent spacing for the page in question.) | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -catr:"One part comics" -excepttext:"epcount( *?)=( *?)1\n" "-regex" "\|prev( )( *?)=( *?)(.*?)\n" "|epcount\2= 1\n|prev\1\2=\3\4\n" "\|series( *?)=( *?)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" -pt: | python pwb.py replace -catr:"One part comics" -excepttext:"epcount( *?)=( *?)1\n" "-regex" "\|prev( )( *?)=( *?)(.*?)\n" "|epcount\2= 1\n|prev\1\2=\3\4\n" "\|series( *?)=( *?)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" -pt:1 -summary:"Adding missing epcount" | ||
</pre> | </pre> | ||
Line 53: | Line 53: | ||
In this case, the variable is <code>epcount</code>, which we want to go before <code>prev, or, if <code>prev</code> is preceded by <code>series</code>, before <code>series</code>... | In this case, the variable is <code>epcount</code>, which we want to go before <code>prev, or, if <code>prev</code> is preceded by <code>series</code>, before <code>series</code>... | ||
<pre style="background:black!important;color:white;font-size:.8em"> | <pre style="background:black!important;color:white;font-size:.8em"> | ||
python pwb.py replace -regex "epcount( *?)=( *?)([^\n]*?)\|featuring" "epcount\1=\2\3\n|featuring" "next( *?)=( *?)([^\n]*?)\|epcount( *?)=( *?)([^ ]*?)\n" "next\1=\2\3\n|epcount\4= \6\n" "epcount( *)=( *)(.*?)\}\}" "epcount\1=\2\3\n}}" "\|prev ( *?)=( *)(.*?)\n([\s\S]*)\n\|epcount=(.*?)\n" "|epcount\1= \5\n|prev \1=\2\3\n\4\n" "epcount=([^ ].*?)\n" "epcount = \1\n" "\|prev( *?)=( *?)(.*?)\n([\s\S]*)\n\|epcount( *?)=( *?)([^ ]*?)\n" "|epcount\5= \7\n|prev\1=\2\3\n\4\n" "\|epcount=( *)([^ ]*?)\n" "|epcount = \2\n" "\|series( *)=( *)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" -catr:"Comic stories" -summary:"Re-organising infobox" -pt: | python pwb.py replace -regex "epcount( *?)=( *?)([^\n]*?)\|featuring" "epcount\1=\2\3\n|featuring" "next( *?)=( *?)([^\n]*?)\|epcount( *?)=( *?)([^ ]*?)\n" "next\1=\2\3\n|epcount\4= \6\n" "epcount( *)=( *)(.*?)\}\}" "epcount\1=\2\3\n}}" "\|prev ( *?)=( *)(.*?)\n([\s\S]*)\n\|epcount=(.*?)\n" "|epcount\1= \5\n|prev \1=\2\3\n\4\n" "epcount=([^ ].*?)\n" "epcount = \1\n" "\|prev( *?)=( *?)(.*?)\n([\s\S]*)\n\|epcount( *?)=( *?)([^ ]*?)\n" "|epcount\5= \7\n|prev\1=\2\3\n\4\n" "\|epcount=( *)([^ ]*?)\n" "|epcount = \2\n" "\|series( *)=( *)(.*?)\n\|epcount( *)=( *)(.*?)\n" "|epcount\4=\5\6\n|series\1=\2\3\n" -catr:"Comic stories" -summary:"Re-organising infobox" -pt:1 | ||
</pre> | </pre> | ||
Line 63: | Line 63: | ||
=== Autolinking infobox variables === | === Autolinking infobox variables === | ||
<pre style="background:black!important;color:white;font-size:.8em"> | <pre style="background:black!important;color:white;font-size:.8em"> | ||
python pwb.py replace -regex "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12\n|\1featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\n" "\n|\1featuring\2=\3\4\n" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12\n|\1featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\}\}\n" "\n|\1featuring\2=\3\4\n" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11\n|featuring9\2=\3\12\n|featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11\n|featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring\d) " "|\1\2 " "\|( *)(featuring\d\d) " "|\1\2 " -transcludes:"Infobox Story" -summary:"Autolinking featuring variable" -pt: | python pwb.py replace -regex "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12\n|\1featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\], \[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\n" "\n|\1featuring\2=\3\4\n" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12\n|\1featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11\n|\1featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10\n|\1featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9\n|\1featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8\n|\1featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7\n|\1featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6\n|\1featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5\n|\1featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\|(.*?)\}\}" "\n|\1featuring\2=\3\4\n|\1featuring2\2=\3\5" "\n\|( *)featuring( *)=( *)\{\{il\|(.*?)\}\}\n" "\n|\1featuring\2=\3\4\n" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11\n|featuring9\2=\3\12\n|featuring10\2=\3\13" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11\n|featuring9\2=\3\12" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10\n|featuring8\2=\3\11" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9\n|featuring7\2=\3\10" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8\n|featuring6\2=\3\9" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7\n|featuring5\2=\3\8" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6\n|featuring4\2=\3\7" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5\n|featuring3\2=\3\6" "\n\|( *)featuring( *)=( *)\[\[(.*?)\]\]\<br */*\>\[\[(.*?)\]\]" "\n|\1featuring\2=\3\4\n|featuring2\2=\3\5" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring|\1featuring.*)( *)=( *)(.*?)\|(.*?)\n" "|\1\2\3=\4\5\n" "\|( *)(featuring\d) " "|\1\2 " "\|( *)(featuring\d\d) " "|\1\2 " -transcludes:"Infobox Story" -summary:"Autolinking featuring variable" -pt:1 | ||
</pre><!-- | </pre><!-- | ||
Line 70: | Line 70: | ||
=== Checking for double NameSorts === | === Checking for double NameSorts === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\{\{NameSort\}\}\n([\s\S]+)\{\{NameSort\}\}" "\1{{NameSort}}" -pt: | python pwb.py replace -regex "\{\{NameSort\}\}\n([\s\S]+)\{\{NameSort\}\}" "\1{{NameSort}}" -pt:1 -transcludes:"NameSort" | ||
</pre> | </pre> | ||
Line 77: | Line 77: | ||
<!-- | <!-- | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|NOTVALID|CON|TWD|BFX|DCOM|PCOM|ICOM|INFO|DWAN)\]\]: \[\[(.*?) \((.*?)\)\|''(.*?)''\]\]" "[[\1]]: ''[[\2 (\3)|\4]]''" "\[\[(.*?)\|''\1''\]\]" "''[[\1]]''" "\[\[(.*?) \((.*?)\)\|''\1''\]\]" "''[[\1 (\2)|\1]]''" "\[\[([\w\d\s\(\)]+?)\|''([\w\d\s\(\)]+?)''\]\]" "''[[\1|\2]]''" "''\[\[(.*?) - list of appearances\|'''see list'''\]\]''" "[[\1 - list of appearances|'''''see list''''']]" -summary:"Piped italics fix(es)" -start:! -pt: | python pwb.py replace -regex "\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|NOTVALID|CON|TWD|BFX|DCOM|PCOM|ICOM|INFO|DWAN)\]\]: \[\[(.*?) \((.*?)\)\|''(.*?)''\]\]" "[[\1]]: ''[[\2 (\3)|\4]]''" "\[\[(.*?)\|''\1''\]\]" "''[[\1]]''" "\[\[(.*?) \((.*?)\)\|''\1''\]\]" "''[[\1 (\2)|\1]]''" "\[\[([\w\d\s\(\)]+?)\|''([\w\d\s\(\)]+?)''\]\]" "''[[\1|\2]]''" "''\[\[(.*?) - list of appearances\|'''see list'''\]\]''" "[[\1 - list of appearances|'''''see list''''']]" -summary:"Piped italics fix(es)" -start:! -pt:1 | ||
</pre> | </pre> | ||
--> | --> | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|NOTVALID)\]\]: \[\[(.*?) \((.*?)\)\|''(.*?)''\]\]" "[[\1]]: ''[[\2 (\3)|\4]]''" -summary:"Piped italics fix: P1" -start:! -pt: | python pwb.py replace -regex "\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|NOTVALID)\]\]: \[\[(.*?) \((.*?)\)\|''(.*?)''\]\]" "[[\1]]: ''[[\2 (\3)|\4]]''" -summary:"Piped italics fix: P1" -start:! -pt:1 | ||
</pre> | </pre> | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\[\[(.*?)\|''\1''\]\]" "''[[\1]]''" "\[\[(.*?) \((.*?)\)\|''\1''\]\]" "''[[\1 (\2)|\1]]''" -summary:"Piped italics fix: P2" -start:! -pt: | python pwb.py replace -regex "\[\[(.*?)\|''\1''\]\]" "''[[\1]]''" "\[\[(.*?) \((.*?)\)\|''\1''\]\]" "''[[\1 (\2)|\1]]''" -summary:"Piped italics fix: P2" -start:! -pt:1 | ||
</pre> | </pre> | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\[\[([\w\d\s\(\)]+?)\|''([\w\d\s\(\)]+?)''\]\]" "''[[\1|\2]]''" "''\[\[(.*?) - list of appearances\|'''see list'''\]\]''" "[[\1 - list of appearances|'''''see list''''']]" -summary:"Piped italics fix: P3" -start:! -pt: | python pwb.py replace -regex "\[\[([\w\d\s\(\)]+?)\|''([\w\d\s\(\)]+?)''\]\]" "''[[\1|\2]]''" "''\[\[(.*?) - list of appearances\|'''see list'''\]\]''" "[[\1 - list of appearances|'''''see list''''']]" -summary:"Piped italics fix: P3" -start:! -pt:1 | ||
</pre> | </pre> | ||
=== Punctuation before citation === | === Punctuation before citation === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "(\w|\]\]|\'\'|[\!-#]) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\.|,|;)" "\1\4 ([[\2]]: ''[[\3]]'')" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\1)" "\1 ([[\2]]: ''[[\3]]'')" "(\w|\]\]|\'\'|[\!-#]) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: (.)\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\3\)(\.|,|;)" "\1\5 ([[\2]]: \3[[\4]]\3)" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: (.)\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\3\)(\1)" "\1 ([[\2]]: \3[[\4]]\3)" -pt: | python pwb.py replace -regex "(\w|\]\]|\'\'|[\!-#]) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\.|,|;)" "\1\4 ([[\2]]: ''[[\3]]'')" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\1)" "\1 ([[\2]]: ''[[\3]]'')" "(\w|\]\]|\'\'|[\!-#]) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: (.)\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\3\)(\.|,|;)" "\1\5 ([[\2]]: \3[[\4]]\3)" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|POEM|GAME|FILM|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: (.)\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\3\)(\1)" "\1 ([[\2]]: \3[[\4]]\3)" -pt:1 -start:! -summary:"Punctuation before citation" | ||
</pre> | </pre> | ||
=== Empty span tags === | === Empty span tags === | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "(\<span\>|\</span\>|\<span class=..\>)" "" -summary:"Removing empty <span> tags" -pt: | python pwb.py replace -regex "(\<span\>|\</span\>|\<span class=..\>)" "" -summary:"Removing empty <span> tags" -pt:1 -start:! | ||
</pre> | </pre> | ||
Line 110: | Line 110: | ||
===== Overly complicated spacing fix ===== | ===== Overly complicated spacing fix ===== | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Yy]ou may)" "{{Infobox\1}}{{you may" "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Dd]ab page)" "{{Infobox\1}}{{dab page" "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Ww]ikipediainfo)" "{{Infobox\1}}{{wikipediainfo" "(\}\}\{\{|\{\{)([sS]tub|.*? stub|wikipediainfo)\}\}\{\{(you may|dab page)" "\1\2}}\n{{\3" "\n\}\}\{\{(.*?)\}\}\{\{(you may|dab page|wikipediainfo)" "\n}}{{\1}///}{{\2" "\{\{Infobox([\s\S]*?)(\]\]|\)|\w)\}\}\{\{(you may|dab page|wikipediainfo)" "{{Infobox\1\2\n}}{{\3" "\}\/\/\/\}" "}}" "\{\{Infobox([\s\S]*?)\}\}\n\n'''" "{{Infobox\1}}\n'''" -summary:"Template [[T:SPACING|spacing]]" -start:! -pt: | python pwb.py replace -regex "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Yy]ou may)" "{{Infobox\1}}{{you may" "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Dd]ab page)" "{{Infobox\1}}{{dab page" "\{\{Infobox([\s\S]*?)\}\}\n\{\{([Ww]ikipediainfo)" "{{Infobox\1}}{{wikipediainfo" "(\}\}\{\{|\{\{)([sS]tub|.*? stub|wikipediainfo)\}\}\{\{(you may|dab page)" "\1\2}}\n{{\3" "\n\}\}\{\{(.*?)\}\}\{\{(you may|dab page|wikipediainfo)" "\n}}{{\1}///}{{\2" "\{\{Infobox([\s\S]*?)(\]\]|\)|\w)\}\}\{\{(you may|dab page|wikipediainfo)" "{{Infobox\1\2\n}}{{\3" "\}\/\/\/\}" "}}" "\{\{Infobox([\s\S]*?)\}\}\n\n'''" "{{Infobox\1}}\n'''" -summary:"Template [[T:SPACING|spacing]]" -start:! -pt:1 | ||
</pre> | </pre> | ||
==== Before headings ==== | ==== Before headings ==== | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "(\w|\)|\.|\')\n==" "\1\n\n==" "(\w|\)|\.|\')( *)\n==" "\1\n\n==" "\n\n\n==" "\n\n==" -excepttext:"PLEASE do not alter" -summary:"[[T:SPACING|Vertical spacing]]" -start:! -pt: | python pwb.py replace -regex "(\w|\)|\.|\')\n==" "\1\n\n==" "(\w|\)|\.|\')( *)\n==" "\1\n\n==" "\n\n\n==" "\n\n==" -excepttext:"PLEASE do not alter" -summary:"[[T:SPACING|Vertical spacing]]" -start:! -pt:1 | ||
</pre> | </pre> | ||
Line 121: | Line 121: | ||
This ''baasically'' does the job, though it's messy and inefficient: | This ''baasically'' does the job, though it's messy and inefficient: | ||
<pre style="background:black!important;color:white"> | <pre style="background:black!important;color:white"> | ||
python pwb.py replace -regex "\n(\*+)(\S)" "\n\1 \2" "(==+)(\S.*?\S)(==+)" "\1 \2 \3" "(=+|==|===|====) = (.*?) = (=+|==|===|====)" "\1= \2 =\3" "== =" "===" "= ==" "===" "(\*|\*+|\*\*|\*\*\*|\*\#|\*\*\#) (\*|\#|\#+|\#\#|\#\#\#|\:|\:+|\:\:|\:\:\:)(.*?)" "\1\2 \3" "\* \*" "**" "\* \#" "*#" "\# \#" "##" "\* " "* " "\# " "# " "\: " ": " -summary:"Horizontal spacing" -start:! -pt: | python pwb.py replace -regex "\n(\*+)(\S)" "\n\1 \2" "(==+)(\S.*?\S)(==+)" "\1 \2 \3" "(=+|==|===|====) = (.*?) = (=+|==|===|====)" "\1= \2 =\3" "== =" "===" "= ==" "===" "(\*|\*+|\*\*|\*\*\*|\*\#|\*\*\#) (\*|\#|\#+|\#\#|\#\#\#|\:|\:+|\:\:|\:\:\:)(.*?)" "\1\2 \3" "\* \*" "**" "\* \#" "*#" "\# \#" "##" "\* " "* " "\# " "# " "\: " ": " -summary:"Horizontal spacing" -start:! -pt:1 | ||
</pre> | </pre> | ||
Line 133: | Line 133: | ||
==== Step 2 ==== | ==== Step 2 ==== | ||
Find-and-replace list into a usable format. | Find-and-replace list into a usable format. | ||
<pre style="background:black!important;color:white">python pwb.py replace "[[Category:Videos]]" "{{good video}}" -pt: | <pre style="background:black!important;color:white">python pwb.py replace "[[Category:Videos]]" "{{good video}}" -pt:1 -page:"File:Video name 1" -page:"File:Video name 2"</pre> | ||
You may have to handle videos with double quotation marks in their titles, manually. | You may have to handle videos with double quotation marks in their titles, manually. | ||
[[Category:User SOTO]] | [[Category:User SOTO]] |
edits