User talk:WindBOT/Filters
Contents
- 1 Uber and Über
- 2 Regex
- 3 Adding Maps filter
- 4 Mini-Crit
- 5 Sentry Gun
- 6 Item infobox filters
- 7 Screenshots Images Category - Blacklisted?
- 8 Korean-specific word replacement request
- 9 Misc items
- 10 More Dutch filters
- 11 "tradeable" > "tradable"
- 12 /hu stuff
- 13 Rome Total War
- 14 Gameid windbot filter
- 15 "Cloak"
- 16 I am Bread
- 17 Wolfenstein
- 18 Batman™: Arkham Knight
- 19 Updates for the infobox params
- 20 Changes
- 21 Change to Spanish filter (the request for Bibi one)
- 22 Ubersaw name in spanish
- 23 Filter modification request
- 24 Giftability and Item Infobox Template
- 25 Archiving Talk Pages
- 26 Filter suggestion
- 27 Suggestions
- 28 File categorization
- 29 Crit captalization filter
- 30 Item infobox filter
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... (t • s) 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)
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 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... (t • s) 12:42, 12 August 2010 (UTC)
- Fix'd — Wind 18:00, 19 August 2010 (UTC)
- Yeah, the official names are Gravel Pit, Double Cross and Badwater Basin. Use these please. -- Smashman... (t • s) 12:42, 12 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 categories 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)
- Where did it do that? — Wind 02:20, 26 March 2011 (UTC)
Korean-specific word replacement request
Hi!
Recently, our members of STS decided to change classname Soldier in Korean from 솔져 to 솔저. So, it is necessary to replace every single word "솔져"(except quotation marks) with "솔저" in zhis wiki!
I wrote a chunk of code, referring other existing codes on Filters page; please review the following code and apply if it is correct:
addSafeFilter( dumbReplace( u'솔져', # from u'솔저' # to ), language='ko' )
Thanks! — Cyrus Hackford (T / C) // 02:43, 27 October 2011 (PDT)
- Have the changes been pushed to the game yet? If they're in STS, it's best to wait before doing such a massive replace. Also, there is a better solution: Replace them all by
{{Class name|Soldier}}
, which will show an auto-translated version of the class name "Soldier" as defined in{{dictionary/classes}}
. Then, any edit to{{dictionary/classes}}
will propagate to all pages in one shot~ — Wind 10:42, 27 October 2011 (PDT)- Yeap, the change is now in effect in-game. Of course using that Dictionary wrapper is the best solution, but there are many "un-wrapped" texts out there. :( — Cyrus Hackford (T / C) // 11:34, 27 October 2011 (PDT)
- Well alright then, but I think it'd be better to use
wordFilter
instead ofdumbReplace
, as dumbReplace is a really, really dumb replace. For example,dumbReplace('hell', 'heaven')
applied to the sentenceOh hello there
would giveOh heaveno there
. However,wordFilter
only replaces words when they are whole words, so thathell
inhello
wouldn't be replaced. Would that work for Korean though? Are all words always separated with regular spaces or latin-like punctuation signs, such thatwordFilter
would identify them as such? — Wind 11:42, 27 October 2011 (PDT)- Unfortunately, no. Korean grammar forces any nominative postpositions to be attached to prior nominative noun; so 솔져의, 솔져가, 솔져에게, 솔져는, 솔져를, and so on should all be changed as well. Therefore,
dumbReplace
is the very function we need to use. Thanks for your hearty help! — Cyrus Hackford (T / C) // 11:58, 27 October 2011 (PDT)- Very well then, it's been added. Keep in mind that the bot doesn't actively crawl the wiki, it just runs over pages that get recently edited. If you want to force it to look at certain pages or categories of pages to speed up the process, you can add them here — Wind
- Your gracious help will eventually crank up the general Korean wiki-readers' convenience in any way! Thank you again! — Cyrus Hackford (T / C) // 12:11, 27 October 2011 (PDT)
- Why, welcome :3 It's not every day that I get a request with already-provided code, as most people don't bother reading the documentation. By the way, next time ask me on IRC, it makes this kind of conversation much easier than with awkward wikicode. You should join it any time anyway, is a good place. Thanks~ — Wind 12:14, 27 October 2011 (PDT)
- Your gracious help will eventually crank up the general Korean wiki-readers' convenience in any way! Thank you again! — Cyrus Hackford (T / C) // 12:11, 27 October 2011 (PDT)
- Very well then, it's been added. Keep in mind that the bot doesn't actively crawl the wiki, it just runs over pages that get recently edited. If you want to force it to look at certain pages or categories of pages to speed up the process, you can add them here — Wind
- Unfortunately, no. Korean grammar forces any nominative postpositions to be attached to prior nominative noun; so 솔져의, 솔져가, 솔져에게, 솔져는, 솔져를, and so on should all be changed as well. Therefore,
- Well alright then, but I think it'd be better to use
- Yeap, the change is now in effect in-game. Of course using that Dictionary wrapper is the best solution, but there are many "un-wrapped" texts out there. :( — Cyrus Hackford (T / C) // 11:34, 27 October 2011 (PDT)
Misc items
Hey, can you please add this filters to the German (de) wiki?
- Diverser Gegenstand, diverser Gegenstand, sonstiger Gegenstand -> Sonstiger Gegenstand
- Diverse Gegenstände, diverse Gegenstände, sonstige Gegenstände -> Sonstige Gegenstände
Thank you. --Picard talk 07:13, 10 December 2011 (PST)
- Done, I hope those accents vs. lack of accents and uppercase vs lowercase were what they were supposed to be — Wind 10:56, 10 December 2011 (PST)
More Dutch filters
Could "officiëel" and "officieël" both be converted to "officieel" on the Dutch pages, because that is the correct spelling and it is sometimes wrong spelled. — Robin0van0der0vliet (talk | contributions) - 08:31, 7 October 2012 (PDT)
- Done — Wind 12:55, 7 October 2012 (PDT)
- I forgot about converting "officiele" to "officiële" (an attributive adjective), which does need an diaeresis.
addSafeFilter( # Requested by Robin0van0der0vliet wordFilter(u'officieel', u'offici[eë][eë]l', keepcapitalization=True), wordFilter(u'officiële', u'offic[iï]ele', keepcapitalization=True), language='nl' )
- Done — Wind 12:07, 4 November 2012 (PST)
- And could you maybe add redirects for the Botkiller weapons, I mean redirecting "Diamond Botkiller Scattergun/nl" to "Scattergun/nl" etc, now only the English, Russian and Chinese version has this and this is too much work to do manual. — Robin0van0der0vliet (talk | contributions) - 12:01, 4 November 2012 (PST)
- No, that's a one-off thing that would be best suited for a script if it had to be done. But does it have to be done at all? I'm not sure if those redirects are worth creating — Wind 12:07, 4 November 2012 (PST)
- You added an filter double now. ;)
- And I saw some broken links to those Botkillers, first the botkiller table had those broken links too, but that is already updated. — Robin0van0der0vliet (talk | contributions) - 12:15, 4 November 2012 (PST)
- No, that's a one-off thing that would be best suited for a script if it had to be done. But does it have to be done at all? I'm not sure if those redirects are worth creating — Wind 12:07, 4 November 2012 (PST)
"tradeable" > "tradable"
Could this filter be added to the Common misspellings filter beneath "Natascha", since this filter only need to be applied to English pages?
wordFilter('tradable', 'tradeable', keepcapitalization=True)
Thanks! — Robin0van0der0vliet (talk | contributions) - 07:13, 17 November 2012 (PST)
- That filter is already there under the Word aliases section. EDIT: I see you mean you actually want it English only. I don't think this could cause any damage if applied to other language pages, unless you believe otherwise? —Moussekateer·talk 07:36, 17 November 2012 (PST)
- I think the most other languages don't use the word "tradable" nor "tradeable", so I think it is only needed on the English wiki. — Robin0van0der0vliet (talk | contributions) - 08:08, 17 November 2012 (PST)
/hu stuff
I've collected the most words which are tend to be misstranslated. I hope the code is right, but will need to check it (what you would do anyway ^^) Also, if I'd like to force WindBOT to check the all existing pages (which are not that much for now), i shall just add the main/hu category to the pagerequests?
addSafeFilter( wordFilter(u'== Frissítési előzmények ==', u'==+ ?*Frissítések ?==+', u'==+ ?*Update ?==+', u'==+ ?*Javítások ?==+'), wordFilter(u'== Lásd még ==', u'==+ ?See also ?==+'), wordFilter(u'== Források ==', u'==+ ?References ?==+'), wordFilter(u'== Kulisszák mögött ==', u'==+ ?Érdekességek ?==+', u'==+ ? Trivia ?==+'), wordFilter(u'== Festett variációk ==', u'==+ ?Painted variants ?==+'), wordFilter(u'== Damage and function times ==', u'==+ ?Damage and function times ?==+'), wordFilter(u'=== Mint barkácsolási kellék ===', u'==+ ?As a crafting ingredient ?==+'), wordFilter(u'== Nem használt tartalom ==', u'==+ ?Unused content ?==+'), wordFilter(u'== Öszefüggő teljesítmények ==', u'==+ ?Related achievements ?==+', u'==+ ?[Aa]chievements ?==+', u'==+ ?Teljesítmények ?==+'), wordFilter(u'== Fura ritkaságú ==', u'==+ ?Strange variant ?==+'), wordFilter(u'== Tárgy-szett ==', u'==+ ?Item set ?==+', u'==+ ?Tárgyszett ?==+', u'==+ ?Tárgy szett ?==+'), wordFilter(u'Alternatív tűzgomb', u'alt-fire', u'másodlagos tűzgomb', u'alternatív tűz', keepcapitalization=True), wordFilter(u'Felderítő', u'Scout'), wordFilter(u'Katona', u'Soldier', u'Solider'), wordFilter(u'Piró', u'Pyro', u'Pyró', u'Piro'), wordFilter(u'Robbantós', u'Demoman'), wordFilter(u'Gépágyús', u'Heavy', u'The Heavy'), wordFilter(u'Mérnök', u'Engineer'), wordFilter(u'Szanitéc', u'Medic'), wordFilter(u'Mesterlövész', u'Sniper'), wordFilter(u'Kém', u'Spy'), wordFilter(u'promóciós', u'promotional', u'promocionális', u'promócionális', keepcapitalization=True), wordFilter(u'Beszólás', u'Gúnyolás', u'Taunt', keepcapitalization=True), wordFilter(u'Beszólások', u'Gúnyolások', u'Tauntok', keepcapitalization=True), wordFilter(u'Őrtorony', u'Sentry gun', u'Sentry-gun'), wordFilter(u'barkácsolás', u'craftolás', u'fabrikálás', keepcapitalization=True), wordFilter(u'barkácsoláshoz', u'craftoláshoz', u'fabrikáláshoz', keepcapitalization=True), wordFilter(u'hulladékfém', u'hulladék fém', u'scrap metal'), wordFilter(u'barkácstárgy', u'[Cc]raft tárgy'), wordFilter(u'Token', u'token', u'Zseton'), wordFilter(u'osztály', u'kaszt', u'class', keepcapitalization=True), wordFilter(u'osztályok', u'kasztok', u'classok', keepcapitalization=True), language='hu' )
enforceCapitalization('Frissítés', 'Frissítések')
Monte / talk 04:08, 1 May 2013 (PDT)
- Just made some fixes for you, that you can see in the diff. And yes you can force WindBOT to look through all the /hu pages by adding [[:Category:Main/hu]] to its request page. —Moussekateer·talk 05:05, 1 May 2013 (PDT)
- Sorry but this is way too broad and will create lots of false positives. Do not use the bot for autotranslation, it will end in pain. Header names are probably fine because the
==
will make sure it only applies to header names — Wind 09:32, 1 May 2013 (PDT)- Nope, i didn't wanted fot that (and if i understood the documentations right, the dumpReplace would be the right thing to mess with the wiki), even it would be kinda easier, I admit ^^.
- So let the already existing stuff as it is and let the bot edit only the new texts would be the wiser idea? Or stripping the list to your mentoined headers only then?
- Monte / talk 15:23, 1 May 2013 (PDT)
- dumbReplace is dumb, but that doesn't mean wordFilter is a lot smarter. For example, the string
Soldier's Slope Scopers
would still get changed toKatona's Slope Scopers
which is worse than the original. I added the header ones — Wind 17:33, 1 May 2013 (PDT)
- dumbReplace is dumb, but that doesn't mean wordFilter is a lot smarter. For example, the string
wordFilter(u'== Sebzési és működési idők ==', u'==+ ?Damage and function times ?==+', u'==+ ?Sebzés és [Ff]unkció idők ?==+'),
though i couldn't find, what is the syntax, if i want to search for both "Sebzés" & "Sebzési" (at the second wrong_to_be_replaced line) Monte / talk 13:00, 24 May 2013 (PDT)
Rome Total War
Please add
"214950", # Total War: ROME II
just beneath "Tom Clancy's Ghost Recon: Future Soldier". Thanks – Smashman (talk) 11:46, 18 June 2013 (PDT)
Gameid windbot filter
Could you make the list publicly editable (like the steamid list) so that users could add new games rather than requiring to edit a protected page? Thanks. Darkid (Talk | Contribs) 15:23, 8 November 2014 (PST)
- I'll do it if people keep bugging me about it. Right now the buggingness level is low enough such that isn't worth the trouble of adding code to do this. Maybe that's because Mousse has been getting all of the pokes though... — Wind 23:13, 8 November 2014 (PST)
"Cloak"
I see a conflict here. In semantic/item names, "Cloak" is in the "exceptions" that "should not count as capitalized weapon names", as it's "Too common to be reliably replaced". But later in semantic/other capitalized words, "Cloak" is in the list of words to always cap. The latter overrides the former, so "cloak" gets capped to "Cloak". What's the deal? Toomai Glittershine 10:44, 16 June 2015 (PDT)
- Welcome to WindBOT, where the left hand doesn't know what the right hand is doing.
- Done — Wind 20:25, 16 June 2015 (PDT)
I am Bread
Please add the game I am Bread to the price updating.
"327890", # I am Bread
--Henke37 (talk) 11:36, 13 August 2015 (PDT)
- Done SackZement <Talk> 04:28, 16 August 2015 (PDT)
Wolfenstein
Beep boop:
"201810", # Wolfenstein: The New Order
— The preceding assigned comment was added by Tark {Finish Him! ▪ Contribs} 04:46, 16 August 2015 (PDT)
- Done — Wind 14:05, 16 August 2015 (PDT)
Batman™: Arkham Knight
Beep boop:
"208650", # Batman™: Arkham Knight
— The preceding assigned comment was added by Tark {Finish Him! ▪ Contribs} 16:07, 4 December 2015 (PST)
- Done — Wind 18:36, 30 December 2015 (PST)
Updates for the infobox params
Step 9 - Set correct preferred indentation level
Please add in limited, grade, wear, unusual-effect, item-kind
.
I also doubt limited
needs to be in attributeTypes
(step -1).
Also the link in the first filter should be {{User image}}
not User images. Darkid (Talk | Contribs) 15:49, 30 December 2015 (PST)
- Also need a new
preferedOrder
. What should it be? — Wind 18:36, 30 December 2015 (PST)
preferedOrder = '''name game type beta unused image imagewidth 3d-team 3d-alt 3d-team-alt 3d-image-# 3d-button-# 3d-viewname-# number-of-3d-images number-of-3d-team-images number-of-3d-alt-images view# view#name team-colors team-colors-class# two-models skin-image-red skin-image-blu TFC-model QTF-model hide-kill-icon kill-icon-# kill-text-# kill-tooltip-# used-by slot crafting-slot custom-slot equip-region equip-region-2 equip-region-3 weapon-script contributed-by released availability trade gift market craft paint rename numbered medieval ammo-loaded ammo-carried ammo-type show-ammo reload loadout loadout-prefix quality %ATTRIBUTES% item-kind level limited unusual-effect grade wear item-description item-uses item-flags item-expiration'''.split('\n')
Changes
- RIFT:
91000
-->39120
- PC Gamer:
92500
and92502
--> idk - Total War Master Collection:
/app/16960
--> /sub/51362 ?
RADIST | T | C 07:32, 30 January 2016 (PST)
Change to Spanish filter (the request for Bibi one)
According to the RAE, the names of months and days of the wekk should not be capitalized (unless it is at beginning of text or after a dot). So, just change the part where it says
...(?:del?)? (Enero/ Febrero /Marzo/ Abril /Mayo Ju[nl]io Agosto Septiembre Oct[ou]bre Noviembre Diciembre) de...
to (?:del?)? (enero febrero marzo abril mayo ju[nl]io agosto septiembre oct[ou]bre noviembre diciembre) de
.
Ubersaw name in spanish
The name in spanish for the Ubersaw is Übersaw (with Ü). Windbot seems to "correct" it. · Ashe (talk) 15:02, 14 March 2021 (UTC)
Filter modification request
Change "Variaciones de Colores" to "Variaciones de color" as the Template:Dictionary/common strings says ({{common string|Painted variants}}
) and modify the code to make the bot correct the old name to the new one.
addSafeFilter( # Requested by Dio wordFilter(u'== Variaciones de Colores ==', u'==+ *Variantes +pintadas *==+'), language='es' )
· Ashe (talk) 21:14, 25 May 2021 (UTC)
Giftability and Item Infobox Template
the documentation for Template:Item Infobox states that the gift
parameter is now deprecated, since most items that can be tradable are also giftable, and vice versa. there are like three exceptions, all of which are handled by the template itself. thing is, the bot seems to think that all item infoboxes need the gift
parameter, and it adds it back if it's removed. I just think it should stop doing this. Kestrelguy (talk) 16:23, 10 October 2021 (UTC)
Archiving Talk Pages
yes, I'm making a new request less than ten minutes later. whatever. Help:Archiving says that talk pages should be archived after about ten subjects. that is... most definitely not a rule the wiki abides by very well. presumably, this is because people forget and/or it's somewhat tedious. I think the bot could be made to archive talk pages on its own, though this may be a bit complicated to accomplish−I'm not sure. perhaps it trawls talk pages and, like, if the first ten or more sections haven't been replied to in more than a year, it archives those sections? Kestrelguy (talk) 16:31, 10 October 2021 (UTC)
Filter suggestion
For all links: always make WindBOT replace http
by https
.
Reason: this helps to spread more security across the web. Tiagoquix (talk) 15:47, 28 August 2022 (UTC)
- If a link is problematic with HTTPS-only, that's not a problem: we can then make an exception and use
{{botignore}}
. Tiagoquix (talk) 15:48, 28 August 2022 (UTC)
Suggestions
There are some filters that can be disabled or removed:
- Change Steam profile link to Steamid
- Implement Backpack Item Link template
- Update Blog link
- Update List of item attributes
- Update checklists on list of subscribers, along with User:WindBOT/Item_checklists - Not working for a long time - Thanks Mgpt (talk) 22:34, 1 November 2022 (UTC)
File categorization
The script needs a line to prevent the bot from adding the User images category to audio files Mgpt (talk) 02:37, 29 February 2024 (UTC)
Crit captalization filter
https://wiki.teamfortress.com/w/index.php?title=Cheating&type=revision&diff=3724619&oldid=3724617
This does not make much sense for me. I think it should be removed.
Tiagoquix (talk) 22:34, 17 June 2024 (UTC)
- Help:Style guide#Classes, items, and terms.
| s | GrampaSwood (talk) (contribs) 22:39, 17 June 2024 (UTC)
Item infobox filter
Normally, it would fix the indentation on a recently edited page if it had any errors, but it doesn't seem to work with tournament pages. Check the history for Tournament Medal - BETA LAN 2014. This is not new though, most (if not all) of the tournament pages never got edited by the bot. Mgpt (talk) 23:24, 8 July 2024 (UTC)
- Category:Competitive is blacklisted.
| s | GrampaSwood (talk) (contribs) 23:26, 8 July 2024 (UTC)