Wikipedia:Bots/Requests for approval/MGA73bot 4
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: MGA73
Automatic or Manually assisted: Automatic
Programming language(s): Python - pywikipedia (commonscat.py)
Source code available: Standard pywikipedia
Function overview: Add {{Commons category}} to categories
Edit period(s): Every run will take perhaps a week and my plan was to run a few times each year.
Estimated number of pages affected: Some thousands in category namespace.
Exclusion compliant (Y/N): ? Should not be relevant
Already has a bot flag (Y/N): Yes
Function details: Tags files with {{Commons category}} template based on interwiki links. The bot follows interwiki links if any and checkes if a Commons category is added to one of the foreign articles. If one is there it checks if the link points to an excisting category on Commons and if yes it adds it to the category on en-wiki.
It works a bit like interwiki bots so the bot need good Commons category's and good interwikis to work. If some Commons category links are not found ok then the solution is the same as with interwiki links to correct the Commons category or remove it globally.
Commons category does not only work as as a sort of interwiki link to Commons. It also help bots find categories to add on files when moved to Commons or to find/improve categories for files allready uploaded to Commons. So adding Commons category would help both on Wikipedia and Commons. --MGA73 (talk) 21:47, 25 January 2012 (UTC)[reply]
Discussion
[edit]How do you plan on dealing with incorrect interwiki links? Josh Parris 13:10, 27 January 2012 (UTC)[reply]
What will happen when multiple wikis point at different commons categories? Josh Parris 13:10, 27 January 2012 (UTC)[reply]
I see that commonscat.py was last updated in 2010; have any of the supported templates changed since then? Josh Parris 13:10, 27 January 2012 (UTC)[reply]
Will you be using the -always parameter? Josh Parris 13:10, 27 January 2012 (UTC)[reply]
There's a TODO list in commonscat.py - will you be doing any of the TODOs? Josh Parris 13:10, 27 January 2012 (UTC)[reply]
- Before I run I will check if all templates are updated according to what is used on en-wiki. If not I'll update my version and ask for an update of "the master script". If a template on xx-wiki has changed then the bot will not find it and the result may be that no edit is made.
- No, I do not plan to do any of the TODOs. None of the things on the list are critical - they are "just" (very) nice to have.
- Yes, I will use -always. I know from other wikis that there are some problems with the categories for years (meaning categories like Category:100s and Category:472 BC) so I will skip them or check them manually to reduce the number of mistakes.
- Just like interwiki bots the bot may add wrong links if users add a wrong link on other wikis. My plan is to scan the edits for things that look wrong but since I do not know everything (sadly) there may be cases where I can't tell if the link is correct or not. There I have to hope that another user fixes possible mistakes. --MGA73 (talk) 20:33, 27 January 2012 (UTC)[reply]
- Also see Wikipedia:Bots/Requests for approval/BotMultichill 3 about a similar request. --MGA73 (talk) 22:14, 27 January 2012 (UTC)[reply]
- I just checked commonscat.py and I see "__version__ = '$Id: commonscat.py 9816 2011-12-29 08:24:41Z xqt $'" so it has been updated recently. --MGA73 (talk) 15:19, 28 January 2012 (UTC)[reply]
{{BAG assistance needed}} Whats the status? --MGA73 (talk) 14:18, 4 February 2012 (UTC)[reply]
Cleanup in templates
[edit]I made a list of the 2 main templates and the redirects they have
- Template:Commoncat – used 38 times – 24 times in category name space
- Template:Commons cat - 73467 transclusion(s) found.
- Template:CommonsCat – used 152 times – 0 times in category namespace
- Template:Commonscat - 50762 transclusion(s) found.
- Template:Commonscategory – used 372 times – 16 times in category namespace
- Template:Commons-gallery – used 5 times – 0 times in category namespace
- Template:Commonsimages – used 48 times – 0 times in category namespace
- Template:Commonsme – used 4 times – 0 times in category namespace
- Template:Commonspar – used 10 times – 0 times in category namespace
- Template:Commonspiped – used 1 time – 0 times in category namespace
- Template:Commonstiny – used 10 times – 0 times in category namespace
- Template:Gallery-link – used 5 times – 0 times in category namespace
- Template:Pic – used 4 times – 0 times in category namespace
- Template:Sisterlinkswp – used 4 times – 0 times in category namespace
- Template:Wikicommons – used 152 times – 1 time in category namespace
- Template:Wikimedia Commons – used 6 times – 0 times in category namespace
If we change 800 pages we can orphan and delete 14 redirects. I think that it would be a big improvement if we do that because it makes it easier to maintain the bot and when pages are copied to other wikis they won't have "red links" or need to create a lot of templates/redirects that is really not needed.
Could a permission to orphan 800 articles/categories be included in this request or is a new request better? Or if someone allready have a permission they are most welcome to do the job.
As for the 2 redirects that is most used I think we should leave them for now. --MGA73 (talk) 17:32, 29 January 2012 (UTC)[reply]
- A few of the redirects have now been deleted per Wikipedia:Redirects for discussion/Log/2012 January 27 and more will hopefully follow once they are no longer used. --MGA73 (talk) 17:36, 9 February 2012 (UTC)[reply]
Trial
[edit]Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. for orphaning the template redirect and then Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. towards the original bot task. MBisanz talk 15:17, 6 February 2012 (UTC)[reply]
Trial complete. Both tests done. --MGA73 (talk) 21:40, 6 February 2012 (UTC)[reply]
During the test I noticed that there is some cases where there is a {{Commons|Category:Whatever}}
that gives the same result on the page as {{Commons category|Whatever}}
. However, the first version does not work as good as the second one. Examples: The bot will not check and correct the link if it is wrong and the bots that uses {{Commons category}} to categorize images on Commons will not get good results. So to get maximum benefits we should change from version 1 to version 2. I have no idea how many edits it will give but probably not more than a few hundred or perhaps a few thousand. Should I also do a test of that? --MGA73 (talk) 10:21, 7 February 2012 (UTC)[reply]
- Yes please. MBisanz talk 15:07, 7 February 2012 (UTC)[reply]
Trial complete. for the latest task also. And thank you :-) --MGA73 (talk) 20:43, 7 February 2012 (UTC)[reply]
Do you have a link to the edits? Josh Parris 12:13, 8 February 2012 (UTC)[reply]
- You mean like Special:Contributions/MGA73bot? --MGA73 (talk) 18:28, 8 February 2012 (UTC)[reply]
Links:
- Test 1 - orphan templates
- Test 2 - adding Commons category
- Test 3 - Commons|Category -> Commons category
--MGA73 (talk) 20:07, 8 February 2012 (UTC)[reply]
- Approved. — madman 17:29, 10 February 2012 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.