User talk:WindBOT/Filters

From Team Fortress Wiki
< User talk:WindBOT
Revision as of 02:16, 26 March 2011 by ISonic (talk | contribs) (Screenshots Images Category - Blacklisted?: new section)
Jump to: navigation, search

Uber and Über

Time out here, you'll have to make sure it doesn't affect things like external links. Same goes for images unless you make it so that it moves them to the proper namespace at the same time. -- Vi3trice (talk) 15:08, 6 August 2010 (UTC)

It is all taken care of. :3 the wordFilter function wraps the regex inside more lookaround checks to see if it's not within a link. — Wind 15:22, 6 August 2010 (UTC)
To be more precise, the page's content is first filtered out of templates and links; then, filters are applied to this "clean" text, and then the templates and links are put back in. — Wind 15:25, 6 August 2010 (UTC)

Regex

I was good at regex once:

Find:                                                             Replace:

\[http://en.wikipedia.org/wiki/:*([^][<>"\s]+) ([^]]+)\]          [[:$1|$2]]
\b(?<!-)crit(ical)?(s)?\b                                         Crit$1$2
\bcritical hit(s?)\b                                              Critical hit$1
\bmini[ -]?crit(ical)?(s)?\b                                      Mini-crit$1$2
\b[Ss]entry([ _])[Gg]un\b                                         Sentry$1Gun

All case sensitive. I have a bunch more, as far as I know they all work perfectly. -- Pilk (talk) 22:28, 7 August 2010 (UTC)

Nice! I believe Wind said we could add things ourselves, so you should whack them in yourself. -- Smashman... (ts) 22:33, 7 August 2010 (UTC)
It's really not that simple, running those would destroy things like file names that are still lowercase. That's why there's this wordFilter function to do it more cleanly and hopefully without recurring to a possibly too aggressive regex. As for wikipedia links, I am currently working on filtering links the same way words are filtered, so while the wikipedia case could be done with a regex, I'd rather wait until Seb26 replies to my message asking what cases should be handled exactly. — Wind 22:34, 7 August 2010 (UTC)
You can't make it ignore links/images/nowiki? -- Pilk (talk) 22:37, 7 August 2010 (UTC)
Of course, I'm just saying that running those regexes directly on pages would be harmful. The critical hits/sentry gun cases should be taken care of now, though~ — Wind 22:39, 7 August 2010 (UTC)

Adding Maps filter

Gravelpit to Gravel Pit, Doublecross to Double Cross, Badwater to Badwater Basin, etc., excluding filenames? (in addition to capitalization of map names) -- Nineaxis Duck Gib.png 05:33, 10 August 2010 (UTC)

The bot is changing Gravel Pit to Gravelpit, rather than the reverse. I would fix it, but I have nfi how to do it without fucking things up, so. seb26 (talk) 11:39, 12 August 2010 (UTC)
Yeah, the official names are Gravel Pit, Double Cross and Badwater Basin. Use these please. -- Smashman... (ts) 12:42, 12 August 2010 (UTC)
Fix'd — Wind 18:00, 19 August 2010 (UTC)

Mini-Crit

Smashman's given me the go-ahead for changing Mini-crit to Mini-Crit. Be sure to change the filters, I'm commenting out the one that would revert any edits I make to mini-crit. --Firestorm 16:33, 12 August 2010 (UTC)

Fix'd — Wind 18:00, 19 August 2010 (UTC)

Sentry Gun

Disable the sentry filter due to this diff. -- Pilk (talk) 14:59, 19 August 2010 (UTC)

Fix'd — Wind 18:00, 19 August 2010 (UTC)

Item infobox filters

If anyone is willing to watch over the diffs then just revert my edit. I disabled the filters because I didn't want to leave the bot running them overnight if it wasn't being checked on. seb26 [talk] 09:58, 14 November 2010 (UTC)

Screenshots Images Category - Blacklisted?

I wonder why is the bot removing categorys from files categorized in the "Category:Screenshot_images" category. There's nothing wrong about it, as I believe. :S ~Sonic 02:16, 26 March 2011 (UTC)