Wikipedia:Bots/Requests for approval/UncatTemplateBot
From Wikipedia, the free encyclopedia
[edit] UncatTemplateBot
tasks • contribs • count • logs • page moves • block user • block log • flag log • flag bot
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 generated by me, it goes thru and adds Category:Uncategorized templates to templates that don't have a category.
[edit] Discussion
How are you generating the lists of pages to run it on? -- Tawker 17:41, 16 February 2007 (UTC)
- 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)
- 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)- Actually
[[Category:Uncategorized templates|{{PAGENAME}}]]
--Balloonguy 17:33, 17 February 2007 (UTC)- 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)
- 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)
- 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)
- Looks good. Can you use query.php to get the page lists, though? (http://en.wikipedia.org/w/query.php) —METS501 (talk) 04:38, 24 February 2007 (UTC)
- I don't know how to use query.php, need help--Balloonguy 23:14, 26 February 2007 (UTC)
- 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)
- That's fine, I can wait.--Balloonguy 22:27, 28 February 2007 (UTC)
- 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)
- That's fine, I can wait.--Balloonguy 22:27, 28 February 2007 (UTC)
- 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)
- I don't know how to use query.php, need help--Balloonguy 23:14, 26 February 2007 (UTC)
- 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 Cat:stub categories hierarchy in the "whitelist" of categories-templates-should have? (Or, some combination of the two.) Alai 20:16, 7 March 2007 (UTC)
-
- 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)
-
-
- 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 Cat: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 (WP: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)
- 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)
-
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)
- 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)
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)
- 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)
-
- 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)
-
- 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)
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)
- If you can generate a list than that would be better, I can wait.Balloonguy 21:41, 14 March 2007 (UTC)