User talk:MMABot/v1.0 Discussion
This is an archive of past discussions about User:MMABot. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Proposal for tasks for MMABot to perform
I am seeding this discussion with a set of tasks for the MMABot to perform. Each task will be its own subsection to allow anyone who wishes to comment on an individual task can do so. If there is a task you would like to see MMABot perform you can create a subsection for that task. Please keep in mind that my intentions with the MMABot is to help the editors of the MMA Wikiproject standardize MMA fighter pages. Also keep in mind that there are a number of policies for bots to be approved and used without being blocked. --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
Standardize MMA record section headers
I've noticed that not all pages have the same header for this section. I think most pages are using ==Mixed martial arts record== there are some that use ==MMA record== or have incorrect capitalization. Assuming I know what the possible varitions are, this section heading can be standardized by the bot. --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
- Done I've created a bot that checks an article and replaces the following headers: ==MMA record==, == MMA record ==, == MMA Record ==, ==MMA Record==, ==Mixed Martial Arts Record==, == Mixed Martial Arts Record ==, ==Mixed Martial Arts record==, == Mixed Martial Arts record == and replaces it with ==Mixed martial arts record==. This should take care of the variations in header text. If someone know of a different varation, let me know. --TreyGeek (talk) 22:25, 23 June 2011 (UTC)
MMA record start template
There is now a template {{MMA record start}} that provides the headers for the record table and an associated {{end}} tag. Not every article is using this template. The MMABot can remove the old version of the table that specified the headers and formatting from the article and replace it with this tag and add the end tag after the table. --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
- Doing...I've got an initial implementation of this done. However, there are a wide variety of different table headers that lack the template. If people want to suggest articles that have more unusual table headers I can check to see if my method will catch the different variations. --TreyGeek (talk) 23:45, 23 June 2011 (UTC)
Correct number of columns
Some fight tables do not have all of the tables specified. I've seen a number that are missing the final '|' for the notes column. The MMABot can count the number of columns specified for each row and if the final column was left off add the '|' as needed. --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
- Done What I've done is basically count the number of columns defined in the wiki markup for each row of the table. If the number of columns is 9, suggesting that the notes column was left off, I add an extra '|' for the notes column. Otherwise, I ignore the row and move on. I'm thinking if the number of columns isn't 9 or 10, suggesting that the row is different than what I'm expecting and what exists for most articles, I'll just have the bot provide a report with those articles to be looked into manually. --TreyGeek (talk) 03:34, 24 June 2011 (UTC)
Convert raw dates to using dts template
There may be date fields in the table that are raw dates (ie "January 31, 2009") rather than using the {{dts}} template. The MMBot can attempt to parse out the date and replace it with the correct template information. (It just means making sure I catch the different versions of dates such as US, ISO, etc.) --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
- Done In a random spot check of article it seems many are already using the {{dts}} template. The bot will examine each row of the record table. If the date field does not start with the template, I attempt to parse the date. The date formats I'm looking for are: "month day year", "year month day", "year-month(number)-day", "month(number)/day/year". --TreyGeek (talk) 22:39, 26 June 2011 (UTC)
Removing future fights
There has been a consensus in the past that future fights should not be in the fight record table. It appears that consensus is being maintained. If you disagree with this consensus take it up at discussion on the WikiProject. If this consensus stays, the MMABot can check the dates on the record entries and if the date is in the future, remove the entry from the table. --TreyGeek (talk) 21:28, 22 June 2011 (UTC)
- Done For each row I check the date field. If the date specified is later than the current date then I remove that row from the table. May want to consider changing it to check if the date is further out than a day or two to reduce edit wars (or not run the bot a day or two before a scheduled fight card). That can be worried about later. --TreyGeek (talk) 21:19, 28 June 2011 (UTC)
- There is ZERO consensus for this. BrendanFrye (talk) 08:04, 30 June 2011 (UTC)
- There is. The consensus for this was reached here. As no other consensus in that regard has been reached, the previous consensus remain in place. Jfgslo (talk) 15:46, 30 June 2011 (UTC)
Removing flags from location column
I think the consensus is that flags in the location column are redundant and/or doesn't follow MOS:FLAG. The bot can check this column and remove any {{flagicon}} templates in this column. --TreyGeek (talk) 21:33, 28 June 2011 (UTC)
- Done Trivial to complete. --TreyGeek (talk) 22:00, 28 June 2011 (UTC)
Resolving WP:REPEATLINK issues in the tables
WP:REPEATLINK says that a particular Wikilink should be used only once in a table. This means the MMA fight tables for both fighters and locations are frequently going against this guideline. The bot can basically scan the list of fighters and locations in the table and wiki-link only the first appearance in the table. --TreyGeek (talk) 21:33, 28 June 2011 (UTC)
- Done Repeated links in the "opponent" and "location" columns are now automatically removed by the bot. --TreyGeek (talk) 22:24, 28 June 2011 (UTC)
Removing renaming of event links
There are cases where links to events are 'renamed' using the pipe (|). It is trivial to remove the renaming and leave the link and the displaying text be whatever the target article name is. --TreyGeek (talk) 21:33, 28 June 2011 (UTC)
- Done If there is a pipe in the wikilink for an event, the bot will hack off the pipe and the text between the pipe and the closing wikilink tags. --TreyGeek (talk) 22:38, 28 June 2011 (UTC)
Fix MOS:CAPS problems in the method column
In the method column, there will often be text between parenthesis. This text, as per MOS:CAPS should be in all lowercase letters. The bot, can change the text in the parenthesis to be, appropriately, all lower case letters. --TreyGeek (talk) 00:04, 30 June 2011 (UTC)
- Done That was pretty trival to complete. --TreyGeek (talk) 00:17, 30 June 2011 (UTC)
Standardize location names
There has been a suggestion of standardizing the locations to city, state/province (if applicable), country. I may have to come back to this. The difficulty is given an existing location text ("Las Vegas, Nevada", "Manchester, England", "Montreal, Quebec, Canada") is to know whether it is already correct and if not, what changes need to be made to it. I'm open to ideas on this one. --TreyGeek (talk) 21:33, 28 June 2011 (UTC)
- LOL has done something similar with his script to standardize locations. Perhaps you should check it (User:LOL/mmastylefix.js) and see if it is of any use for the bot the way in which he implemented the locations fix. Another idea would be to have the bot check redirects and correct them to the main article titles, but I think that would be somehow difficult to implement. Jfgslo (talk) 15:42, 30 June 2011 (UTC)
- After looking that LOL's script, my response is "DUH!" Basically if the location contains the name of a state and does not contain "US" or "United States" it needs to be added. If the location contains a province and does not contain "Canada" it needs to be added. Otherwise, the assumption is it is correct. As for checking for redirects, at first glance I think it would be possible, but I'm not sure how easy it would be to implement. Maybe later. --TreyGeek (talk) 00:55, 1 July 2011 (UTC)
Done "United States" and "Canada" are added to the location field, if needed, as described in my comments above. --TreyGeek (talk) 02:58, 1 July 2011 (UTC)
InfoBox and MMA Record Box
I realize there are probably things in both the InfoBox (on the top right) and the MMA record box (usually just above the record table) that may need changes and/or standardizations. I'm willing to hear suggestions on these two sections as well. --TreyGeek (talk) 21:46, 22 June 2011 (UTC)
Removing flag icons from InfoBox
There is no justification for flag icons in InfoBox for nationality and locations when both items have a written description. This is supported by MOS:FLAG and this is not controversial (contrary to flags for nationality in record boxes.) Jfgslo (talk) 14:03, 24 June 2011 (UTC)
- Done Pretty trivial to implement. --TreyGeek (talk) 22:58, 28 June 2011 (UTC)
Removing color icons for belts from InfoBox
Several editors add small icons to represent the color of their belt rank. This is not supported by any sort of consensus or guideline and does not serve an encyclopedic purpose. This use is discouraged by WP:ICONDECORATION and, with no rationale to back up their usage, they should be removed. Jfgslo (talk) 14:03, 24 June 2011 (UTC)
- Done The bot will remove instances of the {{color}} template from the rank parameter of the infobox. --TreyGeek (talk) 23:10, 28 June 2011 (UTC)
Matching fight record in MMArecordbox with the one in InfoBox
Several times, the fight record in {{MMArecordbox}} does not match the one in {{Infobox martial artist}} as the InfoBox is not as regularly updated as the record box. Matching the contents with the bot would help to solve this. Jfgslo (talk) 15:53, 30 June 2011 (UTC)
- Excellent idea! It has been on the tip of my thoughts but never made it all the way out. I'm thinking of the best way to handle this. Should it simply take the numbers from the MMARecordBox and put them in the Infobox? Another idea would be to take the information from the record table to figure out the correct numbers, but that would get complicated, especially to figure out the number of submission/ko wins and losses. Thoughts? --TreyGeek (talk) 16:47, 30 June 2011 (UTC)
- The more simple way is to take the numbers from MMARecordBox and put them in Infobox martial artist. My reasoning for using MMARecordBox as the base instead of the infobox is that MMARecordBox is more commonly updated due to the fact that the MMA record has it's own section, while editing the infobox implies editing the whole article. In my experience, MMARecordBox is always updated.
- While it is indeed complicated to take the information from the record table, it could be used for a verification function in which, if the numbers of wins and losses in the latest bout in a record table do not match the numbers of MMARecordBox but match the ones in the infobox, then the MMARecordBox should be filled with the data used in the infobox. Alternatively, the bot could only check the number of wins and losses and if they do not match MMARecordBox, it could simply leave a message warning users about that difference so that editors can actually check the information and correct it. Jfgslo (talk) 02:23, 1 July 2011 (UTC)
- Doing... I wasn't sure which box was correct more often than not (I usually don't update either box). At the moment, I've programmed it so that if the numbers between the two boxes don't match I shoot a message to my console so that I can manually look at it. I don't think it'll be difficult to alter that to update the Infobox instead. I'll think about it. I do appreciate the suggestion. --TreyGeek (talk) 02:58, 1 July 2011 (UTC)