Wikipedia:Bots/Requests for approval/CommonsCategoryBot
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was
Withdrawn by operator.
New to bots on Wikipedia? Read these primers!
- Approval process – How this discussion works
- Overview/Policy – What bots are/What they can (or can't) do
- Dictionary – Explains bot-related jargon
Operator: TheImaCow (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 21:08, Wednesday, February 3, 2021 (UTC)
Function overview: Adds Template:Commons category to articles that are linked to a Commons category via Wikidata but lack the template.
Automatic, Supervised, or Manual: Automatic
Programming language(s): AWB
Source code available: AWB, orginal configuration at https://pastebin.com/qeqA7MDi, updated/improved confg at https://pastebin.com/ha8uGR4d
Links to relevant discussions (where appropriate):
Edit period(s): When i start it (irregular)
Estimated number of pages affected: At least 220,000.
Namespace(s): Mainspace
Exclusion compliant (Yes/No): Yes
Function details: The bot would add template {{Commons category}} to articles that have an associated category on Wikimedia Commons, but lack the mentioned template. In my opinion, the template is much more practical than the link in the sidebar, because it explicitly says "media", which is not the case with the sidebar - so it would certainly be easier for the "normal" reader to find the Commons images. About the way it works: The bot doesn't automatically search for such articles, I feed him with them. I have a list at User:TheImaCow/checkccat with a lot of such articles from a number of topics - how I get to the lists is explained there. Since the bot uses AWB as a base, I will import individual groups, and then let it work through them. The bot is always started manually, I don't want to run it 24/7, or have my PC running non-stop. --TheImaCow (talk) 21:08, 3 February 2021 (UTC)[reply]
- An updated version, thanks to the suggestions below:
- To the actual functionality: As you can see in the the config, the bot replaces
==\s*External links\s*==
with
==External links==
{{Commons category}}
- If stub tags are found, the inline version will be used.
- If the External link heading does not exist, the "See also"-Section will be used.
- If both sections are not present, but a simple
==\s*References\s*==
{{Reflist}}
==References==
{{Reflist}}
==External links==
*{{Commons category-inline}}
If none of the mentioned sections or already existing templates like {{Commons category}} and redirects are found, then the page will be skipped. --TheImaCow (talk) 06:17, 23 February 2021 (UTC)[reply]
orginal description
|
---|
Okay, enough babbling, to the actual functionality: As you can see in the the config, the bot replaces
When
is not found, it replaces
with
And if it does not find that either, it replaces
with
If the bot doesn't find anything or a template/redirect to Template:Commons category or Template:Commons category-inline it also skips directly. I have already tried this manually multiple times today, and it has always worked. Questions? Ask them! --TheImaCow (talk) 21:08, 3 February 2021 (UTC)[reply] |
Discussion
editWhat if a given article decides that the template is bloat and shouldn't be added? Will your bot respect the removal, or will it readd it on the next run (ie, edit war with the removal)? ProcrastinatingReader (talk) 14:45, 4 February 2021 (UTC)[reply]
- ProcrastinatingReader, Good point. I just looked at many of the bridge articles, and in almost all cases they are stubs where that is the case. (like Pol-e Dokhtar, which is actually not a bridge ..but it has a commonscategory, so okay.) Let's see if I can make it so that if stub tags are found on the page, Template:Commons category inline will be used.
- Topic Edit-War: It can't actually come to that, because I feed the bot with articles on certain topics, and when he's done with those topics, then he's done with them, and then he doesn't come into contact with those articles at all anymore. So if the template is removed, then that stays removed. --TheImaCow (talk) 15:32, 4 February 2021 (UTC)[reply]
- So, I've now changed it to use {{Commons category-inline}} if stub tags are present. Was surprisingly easy. Updated configuration file is here. --TheImaCow (talk) 15:59, 4 February 2021 (UTC)[reply]
I am mildly concerned about the proposed addition to the References section. To be pedantic, the Commons link is not related to references. More importantly, in my experience, some floating templates, when added to the References section, change the section from three columns to two columns (on my screen), resulting in a bunch of undesirable white space and increased vertical scrolling. I would prefer to see a new External Links section added, perhaps with the inline template used in order to avoid the appearance of an "empty" EL section with just a floating box in it. – Jonesey95 (talk) 16:43, 4 February 2021 (UTC)[reply]
- Another good point. I've tried that now, but no matter what, the heading is always not placed at all or placed incorrectly - so now the {{Commons category}} template will only be added to "See also" or ""External links" sections. --TheImaCow (talk) 18:22, 4 February 2021 (UTC)[reply]
- I have now tested around a bit more: If the references consist of a simple {{reflist}}, then I can also add a new section "External links". [1] Will test this more though. --TheImaCow (talk) 20:05, 4 February 2021 (UTC)[reply]
- {{Commons category-inline}} should probably be placed in a list item, per the docs. — The Earwig ⟨talk⟩ 20:52, 4 February 2021 (UTC)[reply]
- You mean with a "*"? Yes, I already noticed that and built it in. The new config is at https://pastebin.com/W1aUMYs8 But thanks! --TheImaCow (talk) 21:10, 4 February 2021 (UTC)[reply]
- The diff linked above did not include the recommended bullet, and it looks like there may be at least one place in the code where the inline template is inserted without a bullet (I can't really read the code, though, so I could definitely be wrong). Thanks for being so reasonable about my trivial concerns. – Jonesey95 (talk) 22:23, 4 February 2021 (UTC)[reply]
- So now, however, it should be. About the code: I recommend copying it to an .xml file and then loading it directly into AWB, that's certainly easier than trying to read it. Also, I set it to always use the inline variant for newly created for newly created ==External links== headings. (like here) --TheImaCow (talk) 09:30, 5 February 2021 (UTC)[reply]
- An impoved, less confusing configuration file (200 instead of 600 lines) is at https://pastebin.com/ha8uGR4d --TheImaCow (talk) 13:16, 7 February 2021 (UTC)[reply]
- The diff linked above did not include the recommended bullet, and it looks like there may be at least one place in the code where the inline template is inserted without a bullet (I can't really read the code, though, so I could definitely be wrong). Thanks for being so reasonable about my trivial concerns. – Jonesey95 (talk) 22:23, 4 February 2021 (UTC)[reply]
- You mean with a "*"? Yes, I already noticed that and built it in. The new config is at https://pastebin.com/W1aUMYs8 But thanks! --TheImaCow (talk) 21:10, 4 February 2021 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please try a variety of pages to test different situations (presence/absence of the various sections) and in a variety of topic areas to increase the number of editors who may notice the changes. Also, please put a link to this BRFA in the edit summary during the trial. — The Earwig ⟨talk⟩ 05:47, 14 February 2021 (UTC)[reply]
- The Earwig, The account needs to be added to Wikipedia:AutoWikiBrowser/CheckPage. --TheImaCow (talk) 18:25, 14 February 2021 (UTC)[reply]
- @TheImaCow: Done. — The Earwig ⟨talk⟩ 19:37, 14 February 2021 (UTC)[reply]
Trial complete. [2] The only error was this one, but I just fixed the problem (skip if {{sisterlinks}} exists). --TheImaCow (talk) 19:57, 14 February 2021 (UTC)[reply]
- @TheImaCow: Done. — The Earwig ⟨talk⟩ 19:37, 14 February 2021 (UTC)[reply]
- The Earwig, The account needs to be added to Wikipedia:AutoWikiBrowser/CheckPage. --TheImaCow (talk) 18:25, 14 February 2021 (UTC)[reply]
{{BAG assistance needed}} No BAG attention for 1 week. --TheImaCow (talk) 15:48, 22 February 2021 (UTC)[reply]
- I would honestly say increasing the use of this template in today's environment would be a mistake (with Wikidata links to Commons easily available). We also just had an RFC on the matter that has yet to be closed. This task should not run until it is closed in favor of the 'B' option, if that is what it is closed as. See WP:VPPRO#RfC: What to do with category links to Commons?. --Izno (talk) 01:34, 23 February 2021 (UTC)[reply]
- Mike Peel may also already have some semi-automated program to perform actions similar to this, and should be informed accordingly. --Izno (talk) 01:35, 23 February 2021 (UTC)[reply]
- Oh, I didn't know anything about that Rfc. The options A1-3 are only for categories, I don't want to touch them with the bot, and for option B there seems to be light support. But let's wait for the final result, until then I have deactivated the "assistance needed" template. Pinging also User:Mike Peel. --TheImaCow (talk) 06:17, 23 February 2021 (UTC)[reply]
- @TheImaCow: I'm very happy to see this bot. :-) I was going to propose something similar eventually, but it was a few steps away for me as I was trying to do things via RfCs and after cleaning up Category:Commons category link is locally defined (only another 12k to go!). I'm not 100% sure how the community will react to your bot when it's underway, but I really hope it's positive.
- Looking at the config, I think you're using the sitelinks, which is definitely the way to go (I've seen others like Jarbot task 2 using Commons category (P373), which has a lot of bad values, but sitelinks are generally good). You may want to double-check that the sitelink contains 'Category' though, as there are quite a few to galleries (but in most of those cases, if you follow the topic's main category (P910) value you'll find a category item with a commons category sitelink in it - the {{Commons category}} template automatically does this).
- Also, please try to avoid adding new 'External links' sections if you can. Personally, I don't think links to Commons are 'external', but I know others disagree. I also generally don't like external links sections as they tend to attract spam. If there is no 'External links' section, but there is a 'See also' section, I suggest adding the template there instead - this is quite common behaviour in articles already. Thanks. Mike Peel (talk) 10:01, 23 February 2021 (UTC)[reply]
- Yes, sitelinks will be used. Topic "External links": The "See also" section is already preferred over the new section, see this trial diff. And even when a new section is added, it's relatively rare - I've already looked at the possible changes on a few hundred pages to make sure everything works, and there it only happens every fifth or sixth time that a new heading is created. And just for the record: This kind of thing is also being prevented now. --TheImaCow (talk) 14:59, 23 February 2021 (UTC)[reply]
- Oh, I didn't know anything about that Rfc. The options A1-3 are only for categories, I don't want to touch them with the bot, and for option B there seems to be light support. But let's wait for the final result, until then I have deactivated the "assistance needed" template. Pinging also User:Mike Peel. --TheImaCow (talk) 06:17, 23 February 2021 (UTC)[reply]
- The RfC was closed against Option B, which suggests to me that this task does not have consensus to run. — The Earwig (talk) 20:06, 5 March 2021 (UTC)[reply]
- It says that B applies only to categories (so any bot task that adds the template to categories does not have consensus). But if it also affects articles, then I guess I'll have to withdraw this request.. (Pinging @Wugapodes:, who closed it.) --TheImaCow (talk) 11:54, 7 March 2021 (UTC)[reply]
- You are right that the RFC specifically was about category pages, but most of the arguments in opposition that I see would apply to articles as well (or even more strongly, since they are more visible). In either case, we'll need demonstrable consensus for this task to go forward. Sorry. — The Earwig (talk) 18:02, 7 March 2021 (UTC)[reply]
Withdrawn by operator. Message me if needed! --TheImaCow (talk) 19:58, 7 March 2021 (UTC)[reply]
- You are right that the RFC specifically was about category pages, but most of the arguments in opposition that I see would apply to articles as well (or even more strongly, since they are more visible). In either case, we'll need demonstrable consensus for this task to go forward. Sorry. — The Earwig (talk) 18:02, 7 March 2021 (UTC)[reply]
- It says that B applies only to categories (so any bot task that adds the template to categories does not have consensus). But if it also affects articles, then I guess I'll have to withdraw this request.. (Pinging @Wugapodes:, who closed it.) --TheImaCow (talk) 11:54, 7 March 2021 (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 Wikipedia:Bots/Noticeboard.