Edit source Talk
< Appropedia:Stubs from Wikipedia articles

Appropedia:Stubs from Wikipedia articles/template cull

From Appropedia

bot command for removing unwanted Wikipedia templates & interlanguage links:

Add new examples at end of first line followed by pipe | :

python replace.py -regex "(?i)({{(Link FA|

)\|.*?}})(<br>)?(\r\n)?" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"

Done:

python replace.py -regex "(?i)({{(Orphan|primarysources|refimprove|Commons cat|Portalpar|Unreferenced)\|.*?}})(<br>)?(\r\n)?" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"

Done:

python replace.py -regex "(?i)({{[a-z]*-stub}}|{{Portal\|.*?}}|{{Politics of the African Union mini}}|{{Sustainability\|.*?}})(<br>)?(\r\n)?" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"

Done:

python replace.py -regex "(?si){{[a-z]*-stub}}(\r\n)?" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"

Done:

python replace.py -regex "(?si)({{(.*?)-stub}}|{{database-stub}}|{{otheruses}}|{{Abortion law sidebar}}|{{Portal\|.*?}}|{{Politics of the African Union mini}}|{{Sustainability\|.*?}})" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"


Find more at Special:WantedTemplates.

Done:

python replace.py -regex "(?i)\*{{flagcountry\|(.*?)}}" "* [[\\1]]" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"
python replace.py -regex "{{Infobox Geopolitical organization|(.*?)}}" "" -transcludes:"attrib wikipedia raw" -summary:"removing unused Wikipedia templates"

Interlanguage links - use (?u) prefix to recognize all character sets:

python replace.py -regex "(?u)\[\[([a-z][a-z][a-z]?|simple):(.*?)]](\r\n)?" "" -transcludes:"attrib wikipedia raw" -summary:"removing Wikipedia interlanguage links"