From e81284af91ed48f3d544bf2f618d0629f30ca997 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 26 Aug 2012 02:36:04 -0400 Subject: [PATCH] A list of regexes for templates that always go above the banner. --- earwigbot/tasks/wikiproject_tagger.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/earwigbot/tasks/wikiproject_tagger.py b/earwigbot/tasks/wikiproject_tagger.py index e0ae917..658949b 100644 --- a/earwigbot/tasks/wikiproject_tagger.py +++ b/earwigbot/tasks/wikiproject_tagger.py @@ -20,14 +20,40 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import re + from earwigbot.tasks import Task class WikiProjectTagger(Task): - """A task to tag talk pages with WikiProject Banners.""" + """A task to tag talk pages with WikiProject banners. + + Usage: + earwigbot -t wikiproject_tagger PATH [--category CAT] + """ name = "wikiproject_tagger" + # Regexes for template names that should always go above the banner: + TOP_TEMPS = [ + "skip[ _]?to ?(toc|talk|toctalk)", + "community ?article ?probation", + "censor(-nudity)?", + "controvers(ial2?|y)" + "blp(o| ?others?)?", + "(user ?)?talk ?(header|page|page ?header)", + "(not ?(a ?)?)?forum", + "tv(episode|series)talk", + "recurring ?themes", + "faq", + "(round ?in ?)?circ(les|ular)", + "ar(ti|it)cle ?(history|milestones)", + "failed ?ga", + "old ?prod( ?full)?", + "(old|previous) ?afd", + "((wikiproject|wp) ?)?bio(graph(y|ies))?" + ] + def setup(self): pass def run(self, **kwargs): - pass + print kwargs