User:SOTO/bot tricks: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
Tag: sourceedit
Tag: sourceedit
Line 11: Line 11:
'''Absolute bottom'''
'''Absolute bottom'''
<pre style="background:black;color:white">
<pre style="background:black;color:white">
python replace.py -cat:"New category" -regex "\[\[Category:(New category)\]\]\r\n([\s\S]*)\r\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" "\[\[Category:(New category)\]\]\r\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" -pt:1
python replace.py -cat:"New category" -regex "\[\[Category:(New category)\]\]\r\n([\s\S]*)\r\n\[\[Category:(.*?)\]\]" "\2\n[[Category:\3]]\n[[Category:\1]]" "\[\[Category:(New category)\]\]\r\n\[\[Category:(.*?)\]\]" "[[Category:\2]]\n[[Category:\1]]" -pt:1
</pre>
</pre>


=== Adding FTRW category only if contains <nowiki>{{</nowiki><code>wikipediainfo</code>}} ===
=== Adding FTRW category only if contains <nowiki>{{</nowiki><code>wikipediainfo</code>}} ===
Cookies help us deliver our services. By using our services, you agree to our use of cookies.