Wikipedia:Bots/Requests for approval/UncatTemplateBot
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
Operator: Balloonguy
Automatic or Manually Assisted:Automatic
Programming Language(s):AWB
Function Summary:Adds Category:Uncategorized templates to templates that do not have a category
Edit period(s) (e.g. Continuous, daily, one time run):One time run
Edit rate requested: 5 edits per minute
Already has a bot flag (Y/N):
Function Details: By using a list of uncategorized templates, it goes through and adds Category:Uncategorized templates to these templates.
Discussion
editHow are you generating the lists of pages to run it on? -- Tawker 17:41, 16 February 2007 (UTC)[reply]
- I use Special:Prefix index to get all the pages in the template namespace. Then I use cat scan to get all pages in Category:Wikipedia templates and its subcategories. I then compare the list and whatever is not in Category:Wikipedia templates and its subcategories get tagged.--Balloonguy 23:29, 16 February 2007 (UTC)[reply]
- May sound silly, but i persume it is adding
<noinclude>[[Category:Uncategorized templates]]</noinclude>
to the templates? Reedy Boy 13:59, 17 February 2007 (UTC)[reply]- Actually
[[Category:Uncategorized templates|{{PAGENAME}}]]
--Balloonguy 17:33, 17 February 2007 (UTC)[reply]- Would it add a line break before adding the category? That might not be a good idea because it would add white space. —METS501 (talk) 14:00, 19 February 2007 (UTC)[reply]
- No, because according to the disclaimer on Category:Uncategorized templatesIf you add this code at the end of the template, please make sure that the opening <noinclude> starts on the same line as the last char of the template code. Experiments revealed that some templates became seriously defunct when that rule was violated.
- Would it add a line break before adding the category? That might not be a good idea because it would add white space. —METS501 (talk) 14:00, 19 February 2007 (UTC)[reply]
- Actually
It will be like this:
last line of template[[Category:Uncategorized templates|{{PAGENAME}}]]but with no includes--Balloonguy 17:17, 19 February 2007 (UTC)[reply]
- Looks good. Can you use query.php to get the page lists, though? (http://en.wiki.x.io/w/query.php) —METS501 (talk) 04:38, 24 February 2007 (UTC)[reply]
- I don't know how to use query.php, need help--Balloonguy 23:14, 26 February 2007 (UTC)[reply]
- Nevermind, I didn't see that you were using AWB. I will implement a feature in the next day or two to get all pages in a namespace through the query.php interface, which is much less taxing on the servers. If you can just wait a couple of days for the next release of AWB, that would be great. —METS501 (talk) 01:58, 27 February 2007 (UTC)[reply]
- That's fine, I can wait.--Balloonguy 22:27, 28 February 2007 (UTC)[reply]
- Actually, I think the easiest would just be to get a database dump which contains only the titles (pages-articles.xml.bz2 which has the contents would work too) and extract the list of pages in the template namespace from there. —METS501 (talk) 21:45, 2 March 2007 (UTC)[reply]
- That's fine, I can wait.--Balloonguy 22:27, 28 February 2007 (UTC)[reply]
- Nevermind, I didn't see that you were using AWB. I will implement a feature in the next day or two to get all pages in a namespace through the query.php interface, which is much less taxing on the servers. If you can just wait a couple of days for the next release of AWB, that would be great. —METS501 (talk) 01:58, 27 February 2007 (UTC)[reply]
- I don't know how to use query.php, need help--Balloonguy 23:14, 26 February 2007 (UTC)[reply]
- Is there actually established consensus for categorising every single template, which seems implicit in the premise of this 'bot? Last time I checked there was an explicit disclaimer not to do this (though it seemed to becoming "more honoured in the breach", even then). In particular, we've been all around this before for stub templates -- which are normally in their corresponding stub categories, but which started acquiring "stub template categories" some time ago (which were in turn subsequently deleted). If this goes ahead, can you either: exclude anything that looks like a stub template; or, include the whole Category:Stub categories hierarchy in the "whitelist" of categories-templates-should have? (Or, some combination of the two.) Alai 20:16, 7 March 2007 (UTC)[reply]
- I was the one that requested that a bot be set up to do this. I've been doing a lot of work recently with sorting out the template categories (see Category talk:Wikipedia templates for the bulk of it). I've not encountered any disclaimers not to do this, and I would disagree with any disclaimer that said that. My reorganization of the template categories stemmed from the difficulties I was having in locating existing templates on a subject; I kept finding more every way I turned, which frequently duplicated the functionality of other templates.
- What I would like to ultimately see set up is a whole series of categories like Category:Astronomical templates, which contain all of the relevant templates for that subject area. This then creates a pool of templates that editors can dip into to find the templates they need easily. I view this bot's task of gathering together all of the templates that aren't in these category structures as a necessary first step along this path.
- Note that I've put the stub templates for that subject area in there as well; personally I don't distinguish between them and other types of templates, at least from a subject-orientated viewpoint. Mike Peel 20:47, 7 March 2007 (UTC)[reply]
- Apparently the text of the "templates" category started 'drifting' about a year ago [1], and has kept on doing so ever since. But I'd still like to see where explicit consensus that every template needs to be so categorised was establised.
- On the previous go-round of this: specifically, I was thinking of Category:Stub templates and its (former) sub-categories: see CFDs (plural, both deleting) here and here. I think similar arguments apply to categorising them on a different axis.
- I don't see how the organisational and duplication issues you mention could arise for stub templates: there's a consolidated list of them (Wikipedia:WSS/P), and they're in a hierarchy of their own already. It seems unlikely that someone decides they're looking for "an astronomy template", starts rummaging through that category, and only then decides it's actually an astronomy stub template they're looking for. Said categorisation would obviously vary from the coding of stub templates suggested by the stub guidelines. I don't especially object to case-by-case by-subject or by-wikiproject categorisation (I've noticed some instances of both when "cleaning up" stub code, but retained them) as the presumption that all stub templates must have them. (Should I also mention that doing this will also page-cache-invalidate about half the article space... twice?) Alai 03:10, 8 March 2007 (UTC)[reply]
- I have similar concerns to Alai - I'm not sure whether he's mentioned this anywhere abovce, but stub templates were all at one time categorised into specific stub template subcategories, but it caused considerable problems and was redundant with other methods of sorting stub templates, so these were deleted. It seems very odd that anyone would consider going back to a system which proved more inefficient than the current one, and would be very keen to see stub templates excluded from this categorisation process. it should be easy enough to do, since they all have uniform names ending in "stub" (the only templates which have that form of name are stub templates). Grutness...wha? 04:47, 8 March 2007 (UTC)[reply]
- BTW, there are other comments on this proposal - mostly negative - here. Grutness...wha? 04:57, 8 March 2007 (UTC)[reply]
I am _not_ wanting to duplicate existing work. All of the stub types are already listed at Wikipedia:WikiProject Stub sorting/Stub types; a Category:Stub templates would be entirely redundant to that. However, I _am_ wanting to see the stub templates put into their subject area's category. This aim has grown rather a lot since I started it (I was originally just trying to find astronomy templates for Category:Astronomical templates); maybe now would be a good time to seek this "consensus" from the community at large. Mike Peel 09:51, 8 March 2007 (UTC)[reply]
- Well, since stub templates are all automatically in their respective stub categories, all of which are subcategories of their main (permanent) category, they are already in their respective subject area's category. I can understand a wish to make the system uniform across all templates, but it does seem a little like duplication as far as th stub types are concerned. Grutness...wha? 23:29, 8 March 2007 (UTC)[reply]
I've now posted this on the village pump; see Wikipedia:Village_pump_(policy)#Categorization_of_templates. Mike Peel 15:22, 11 March 2007 (UTC)[reply]
- If (re)categorizing stub templates might cause ruffles, I say shelve them for the time being; meanwhile, there's a whole host of templates whose categorization would, I believe, benefit editors, if only to prevent unwitting duplication. I think it would also benefit the encyclopedia to be able to direct editors to well-populated template categories, so (a) they may see how much template ground has or hasn't been covered; and (b) they may find a useful template they hadn't yet considered. (I've certainly appreciated the latter!) Regards, David Kernow (talk) 02:20, 12 March 2007 (UTC)[reply]
- That's exactly what I'd suggest. If someone really wants to work on categorising stub templates by topic under the "templates" hierarchy, in addition to under the "stubs" hierarchy, the "uncategorised" ones are easy to find: it'd be almost all of these. If someone does a significant number, and it proves wildly popular, it'd be a simple matter to extend this task to include the remainder at that point. Alai 07:39, 13 March 2007 (UTC)[reply]
- That's fine, there are a lot of templates that do not even have a category, I'll avoid stub templates.--Balloonguy 17:18, 13 March 2007 (UTC)[reply]
I see no reason not to go ahead with trialing this, with the above stipulations. If there's any other large class of templates it's also not 100% clear if they should be categorised on this sort of basis, I'd suggest taking it easy and doing just a few, and seeing if anyone yelps.
However, if you wait a while for a fresh db dump (which should be fairly soon, as the old cycle has (eventually) just finished, but it's well beyond my ken to predict this exactly) then I'll be able to generate a list of candidate templates without you having to do a "live" traverse of the template categories, or rely on catscan, which as I understand it is using month+ replication-lagged toolserver data. Alai 03:04, 14 March 2007 (UTC)[reply]
- If you can generate a list than that would be better, I can wait.Balloonguy 21:41, 14 March 2007 (UTC)[reply]
Alai has provided me a list of uncategorized templates. I have updated the description accordingly.--Balloonguy
- Are you ready to proceed with a trial? Will you be skipping any templates that are already categorized (in case one may have slipped through, or been categorized since the list-making)? ST47Talk 23:17, 17 April 2007 (UTC)[reply]
- I am ready to proceed with a trial. Yes, I will be skipping templates that have been categorized.--Balloonguy 01:04, 18 April 2007 (UTC)[reply]
- has permission been given for a trial here? —— Eagle101 Need help? 21:04, 21 April 2007 (UTC)[reply]
- Not yet. Mike Peel 21:41, 21 April 2007 (UTC)[reply]
- has permission been given for a trial here? —— Eagle101 Need help? 21:04, 21 April 2007 (UTC)[reply]
- I am ready to proceed with a trial. Yes, I will be skipping templates that have been categorized.--Balloonguy 01:04, 18 April 2007 (UTC)[reply]
Are there any outstanding issues with this, or are the BAG ready to consider whether to approve for trial? Alai 04:28, 22 April 2007 (UTC)[reply]
- How many templates are there to be categorised (roughly)? Also, can someone confirm for the that the consenus at the village pump was favourable (it seems to have dropped off the archives). Thanks, Martinp23 09:29, 22 April 2007 (UTC)[reply]
- I would guess that there's ~ 50,000 templates to be categorized (User:Alai/uncattemplates lists the first 10,000, and gets up to the middle of "F"). User:Alai probably has the exact number, though.
- The last version of the VP archive before the section was archived to "/dev/null" that I can find is [2] (warning: the page is rather long). There were only 2 comments, but both were positive. Mike Peel 13:32, 22 April 2007 (UTC)[reply]
- The exact number is 37,263, according to the last db dump. It's boggling enough a number that as well as a trial for technical purposes, it might be a good idea to keep the initial run to relatively modest proportions, just to reality-check that anyone really is "consuming" this cleanup resource (as against creating a huge category that it turns out just sits there stolidly). Alai 05:22, 25 April 2007 (UTC)[reply]
Would it be better if something like {{Uncategorized}} was added, rather than just a category link? That way, there's a noticeable label on the template to say that it needs to be categorized, and it's more likely to be categorized by passers-by/the template creators. Mike Peel 08:31, 25 April 2007 (UTC)[reply]
- I could add both.--Balloonguy 20:25, 26 April 2007 (UTC)[reply]
- I've now created {{UncategorizedTemplate}}. This template will automatically put pages it's used on into the uncategorized templates category. It's separate from the Uncategorized template so that we don't flood the uncategorized article categores. Mike Peel 18:07, 6 May 2007 (UTC)[reply]
Half-relevant note: User:Gracenotes/fixStuff.js, a script I wrote some time ago, can alleviate category maintenance by sorting categories using query.php and ajax, and then replacing them. This might be helpful for actually clearing the huge backlog that will result from this. (Right now it uses modal dialogs; this can probably be altered easily...) GracenotesT § 17:25, 28 April 2007 (UTC)[reply]
OK - Approved for trial. Please provide a link to the relevant contributions and/or diffs when the trial is complete. for 500 edits, adding a template and (if needed) category, all in noincludes. Keep an eye on the various noticeboards around the place an be receptive to stopping the bot if needs be. Keep the edit rate below 2 per minute for the duration of that trial, and report back here when done. Thanks, Martinp23 15:40, 6 May 2007 (UTC)[reply]
What's going on with this? --ST47Talk 10:51, 25 May 2007 (UTC)[reply]
- Have finished trial. There was a complaint about adding a line break and have fixed accordingly.--Balloonguy 22:13, 25 May 2007 (UTC)[reply]
- Approved. 12:28, 26 May 2007 (UTC)
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.