User:SOTO/bot tricks: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
→‎Punctuation before citation: alright, it does need some work to function properly when there's multiple sources in the same parentheses and they don't use redirect titles, as it's looking for non-) chars, but in those cases it simply does nothin
(→‎Punctuation before citation: a thing of beauty; can't believe I never thought to do this before)
(→‎Punctuation before citation: alright, it does need some work to function properly when there's multiple sources in the same parentheses and they don't use redirect titles, as it's looking for non-) chars, but in those cases it simply does nothin)
Line 63: Line 63:
=== 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|GAME|REF|DOC|WC|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\.|,|;)" "\1\4 ([[\2]]: ''[[\3]]'')" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\1)" "\1 ([[\2]]: ''[[\3]]'')" -pt:2 -start:! -summary:"Punctuation before citation"
python pwb.py replace -regex "(\w|\]\]|\'\'|[\!-#]) \(\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\.|,|;)" "\1\4 ([[\2]]: ''[[\3]]'')" "(\.|,|;) \(\[\[(TV|AUDIO|COMIC|PROSE|GAME|REF|DOC|WC|HOMEVID|NOTVALID)\]\]: \'\'\[\[([^\)]*? \([^\)]*?\)\|[^\)]*?|[^\)]*?)\]\]\'\'\)(\1)" "\1 ([[\2]]: ''[[\3]]'')" -pt:2 -start:! -summary:"Punctuation before citation"
</pre>
</pre>


Cookies help us deliver our services. By using our services, you agree to our use of cookies.