< Wikibooks:Reading room < Proposals < 2017
This is an archive of past discussions. 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.

Category infrastructure

This thread continues at a successor thread.
This thread continues at a successor thread.

I propose some simple upgrades to our category infrastructure, which I think has been recognized as a problem for years. It's been upgraded a few times, and those were improvements imho, but it seems to me things can get a whole lot better with this next step I'll describe below. The two basic problems are that  (1) the current system is confusing, and  (2) it underrepresents the content of our books, which reduces the ability of readers to find relevant information and reduces the ability of other projects to provide sister links (for example, if Wikinews or Wikipedia or Wikiquote has a page about Barack Obama, they can't readily provide a sister link to Wikibooks because our category infrastructure doesn't support having a page like that).

So here are my ideas, all of which would be implemented in an incremental way that wouldn't break anything during the transition (I'm confident that can be done, and would see it through):

  • Book categories would have prefix Book:, and subject categories would have prefix Subject:.
Thus, the nature of every such category would be instantly apparent. For example, right now book European History has book category Category:European History and belongs to subject category Category:European history, which is confusing both when setting up the categories and when looking at the categories; as an admin, I've often had to untangle the results when people misunderstand how it all works. Under the new arrangement, these would be Category:Book:European History and Category:Subject:European history.
  • In addition, I suggest we have categories with prefix Keyword:, which are for categorizing page content.
Barack Obama would have a Category:Keyword:Barack Obama. It's important, I believe, to prefix all three kinds of categories, to keep very clear which is which.
  • There should be a template for adding pages to keyword categories, analogous to the existing {{Subjects}} for adding a book to subject categories.
Once we have that infrastructure in place, the task of populating the keyword categories will be simply an incremental thing that happens over a long period of time; I expect the process will get distinctly faster when, after a while, we get dialog-based semi-automated assistants on-line to help guide users through the tasks involved.
  • The list of subjects at the bottom of the main page of a book should link to the subject pages, not to the subject categories.
We've wanted to fix this for years; I can think of at least two possible ways to fix it, and mean to undertake that along with these other upgrades.

--Pi zero (discuss • contribs) 15:19, 30 June 2016 (UTC)

I'd really like some feedback on this. Despite the smooth transition I envision, it's a significant change, and I wouldn't feel right moving forward on it entirely unilaterally. I'm willing to wait (heck, I don't think I would have been able to get started on it yet even if I'd been bowled over with enthusiastic responses when I first posted this); but really clarity about what others think on this is better to hear sooner than later. --Pi zero (discuss • contribs) 13:03, 25 August 2016 (UTC)
On the French Wikibooks we had voted a few years ago, not for a "Book:" prefix but for a " (book)" suffix (provided by {{BookCat}}). The subject categories had remained unchanged. So I could test this a while with Wikidata, and my conclusion is that there is no uniformization, sometimes the Wikipedia category is linked to a subject one, and sometimes to a book one, because when it's the only book of the subject, nobody creates a second redundant category. Moreover, here we are talking about thousands of categories, so I hope that you have some free time ;)
Concerning the "Keyword:", I was one of the firsts to use it for themes (hypernyms), but it has been cancelled for now. What about a categorizing template like {{k|Barack Obama}}?
But to sum up, the only point on which I would really disagree with you, would be to keep the "Subject:" pages, because I find these lists too much redundant with categories, and more painful to maintain. JackPotte (discuss • contribs) 18:16, 25 August 2016 (UTC)
Atm the subject pages are the only reason there's any order at all in the system; they're spectacularly not redundant. The categories are hopelessly confusing, exactly because you can't tell by looking at a category whether it's a collection of pages of a book, or a collection of books. We keep having to fix books whose classification by subject is messed up because a book-category is being mistaken for a subject-category. Fortunately we have a system in place so that problems of this kind automatically get flagged out for us; but with the changes I'm proposing the problem wouldn't happen in the first place.

If we kept the existing categories as they are and also added in categories for collections of pages that aren't necessarily in the same book, the whole thing would be profoundly worse.

However, it would all work smoothly if we introduce an iron-clad, instantly recognizable naming scheme. Which is what I'm proposing to do.

A prefix, with a colon, is absolutely unambiguous ("iron-clad") and is the first thing you see when looking at a category name (because English is read from left to right, of course). A suffix "(book)" doesn't work nearly as well; we have a few of those, for situations where our stop-gap naming convention fails to distinguish between the name of a book and the name of a subject. Moreover, if you look at the list of categories at the bottom of a page, and those categories have these prefixes on them, you'll know instantly exactly what all the things on that list are.

I've had practice with vast structural rearrangements like this. Such things can be done, and can be done smoothly. The fact that it has to be done on each of about 3000 books just means it has to be lined up carefully so that it can then be done gradually, with very simple changes at each book that don't require a lot of thought and aren't going to be done wrong, and everything will keep working right while the gradual change is going on. Often this means doing it in multiple stages, where each stage has to be finished before the next begins. If we want to phase out the subject pages as a separate namespace, the way to not get tangled up in that is to do everything else first, and leave that as a separate stage, to be undertaken only after the rest of it is complete. --Pi zero (discuss • contribs) 19:15, 25 August 2016 (UTC)

@JackPotte: Trying to sum this up: We need a clear, straightforward action plan. I'm offering one. I'm willing to implement it. And, honestly, if we find something about it really doesn't work, we can change it later in fact, after doing this I expect another change will be easier because I'll already have done it once. In particular, as I said, if we want to eliminate the subject pages after the categories have been straightened out, that's cool. But I need some sort of go-ahead before I can proceed. Are you okay with seeing me move forward on this, given that I'm willing to do it and that the things I do can be revised later? --Pi zero (discuss • contribs) 17:24, 28 August 2016 (UTC)
@Pi zero: you have my blessing, but it's typically a bot job, and I can't see any bot belonging to you. As I would like to avoid to waste your time, may I suggest to transform Wikibooks:Desired bots to something we could link to d:Q4582561? Then we would be able to post these specifications and to share the tasks or the scripts to do them. JackPotte (discuss • contribs) 18:12, 28 August 2016 (UTC)
Re bots, the thought is appreciated, but I don't like bots. I really don't. It's not just a personal preference, I disapprove of them philosophically. Wikis should never be maintained by an unthinking entity; the human touch is what makes wikis precious. If I already had my semi-automation tools ported here from Wikinews (which I don't; I'm not satisfied with them yet), I could imagine semi-automation for this, and indeed I have hopes that in the long run almost everything now done with bots can be handled by semi-automation, but for now I have in mind to do things by hand. Which has one beneficial effect: it guarantees my action plan will be simple, and that everything will remain in a consistent state while the work is in progress, because those things have to be true in order for it to be done by hand. Honestly, editing 3000 pages isn't scary; you just need to make sure there's a way to know what has and hasn't been done, and if you do just 64 a day, a month and a half later it'll all be done. (Semi-automation might allow you to do it all in a week or less.) --Pi zero (discuss • contribs) 18:37, 28 August 2016 (UTC)
(I may, indeed, be able to devise a way of doing it so I don't have to directly edit the book pages at all, at least for most of the changes involved; that would be ideal. The previous set of infrastructure changes was feasible exactly because Wikibooks was already using {{subjects}}.) --Pi zero (discuss • contribs) 19:53, 28 August 2016 (UTC)

Subject category renaming

I think the first challenge I'll take on is adding prefix "Subject:" to the subject categories. It's occurred to me that all these category names appear verbatim in the DPLs on the subject pages (see for example Subject:History), and I'm not sure how I feel about all those book titles having "Book:" prefixed to them. Perhaps I just need to get used to the idea. I've been aware for years that there are lots of situations where one really wants to snarf a DPL and then somehow further process the results, which the DPL extension doesn't support at all. I have in mind to semi-automate it using my dialog tools once they're deployed but for now that's not yet an option. --Pi zero (discuss • contribs) 14:40, 4 September 2016 (UTC)

An advantage on your new system would be to automatically display {{Book search}} into the books categories only. JackPotte (discuss • contribs) 07:05, 22 September 2016 (UTC)
Good idea. --Pi zero (discuss • contribs) 09:04, 22 September 2016 (UTC)

Update: I've just been planning out the subject-categories campaign. As best I can figure, besides the categories themselves there are five key pages involved: Subject:Books by subject, {{Root subject}}, {{Subject page}}, {{Allbooks category}}, and {{Subjects}}; each of the five is transcluded on about two or three thousand pages (mostly, subject/category pages and the main pages of books). My basic plan is,  (1) modify the templates to support/populate the new as well as the old cats, and create the new ones;  (2) once the new cats are all available, modify things to use the new ones; and  (3) dispose of the old cats, not forgetting to do history merges when appropriate. --Pi zero (discuss • contribs) 16:14, 27 October 2016 (UTC)

Steps (1) and (2) appear to be complete. (3) is going to take a lot of time and meticulous effort, because it will require manually addressing the subject-categorization of every book, and book category, on the project (all 6390 or so of them). I can't really begrudge the labor, though, because most of it actually goes fairly quickly: the reason it's time-consuming is that it flushes into the open lots of pre-existing categorization errors, which then have to be fixed. So the whole project is going to be much better categorized by completion of this phase. --Pi zero (discuss • contribs) 04:23, 1 November 2016 (UTC)
I've disposed of 1/4 of the old subject categories. I'm rather encouraged about the infrastructure aspect of this; the most awkward/peculiar cases in the project are necessarily turning up and taking time-and-effort to fix, but it's all sorting-out that would need to be done for the next, and much larger, operation of renaming to book categories. Demonstrating that the larger plan is fundamentally coherent, as one phase aids the next. It's also so much easier to work with a mixed set of categories once you can tell at a glance that certain ones of them are subject categories, I'm quite encouraged about the wisdom of the larger renaming scheme. --Pi zero (discuss • contribs) 20:17, 12 November 2016 (UTC)
1/2 now. --Pi zero (discuss • contribs) 23:31, 23 November 2016 (UTC)
60% --Pi zero (discuss • contribs) 21:59, 2 December 2016 (UTC)
70% --Pi zero (discuss • contribs) 03:38, 6 December 2016 (UTC)
80% --Pi zero (discuss • contribs) 23:16, 9 December 2016 (UTC)
90% --Pi zero (discuss • contribs) 16:34, 16 December 2016 (UTC)
Done renaming the subject categories.

My sense, after that effort, is that the even larger effort to rename the book categories is just too large to undertake until I can bring semi-automation to bear on it; so I expect to put any near-future Wikibooks time into dialog/assistants. --Pi zero (discuss • contribs) 23:37, 19 December 2016 (UTC)

@Pi zero: This can probably be done with a bot that has admin rights. —Justin (koavf)❤T☮C☺M☯ 04:17, 20 December 2016 (UTC)
I wouldn't care to try it with a bot. Every case is likely to be different, requiring careful human attention. I hope I can use it as a test case for "growing" a semi-automated assistant, though. That wouldn't happen immediately, but I think separating the subject categories, which is now done, was the more urgent task. I'd rather put overhead effort into the semi-automated route rather than the bot route, because the effort into the semi-automated route also benefits future assistants. --Pi zero (discuss • contribs) 04:30, 20 December 2016 (UTC)

As a simple step to move things forward, I'm considering setting things up so that each subject category page recreates the content of the corresponding subject page. (I meant to set up {{subject category}} so that it would support this if the subject page wanted to cooperate; in theory, it should be just a matter of modifying {{subject page}} and {{root subject}} to provide the necessary content.) --Pi zero (discuss • contribs) 11:25, 7 March 2017 (UTC)

I've done this. All the subject categories should now mirror the full layout on the corresponding subject page; if any of them don't, ping me. --Pi zero (discuss • contribs) 05:35, 18 April 2017 (UTC)
Lessons learned from this operation: A useful test case for the sort of thing I'd like a meta-assistant to be able to help with. A large operation (though just within range for a single person to do manually), mostly repetitive but with occasional customizations required that seem to require a human being to recognize them. I imagine an admin conjuring up a meta-assistant, which then guides them through the process of setting up an assistant for the operation, at each step helping them to recognize and usefully provide information that the human operator should have in order to realize when a particular case wants customized treatment; and flexibility to handle such a case in a partly or entirely manual fashion, informing the manually intervening operator of what the uncustomized behavior would be and making it easy to get back into the semi-automated part of the operation once that manual intervention has been completed.

(Why am I so concerned with aspiring to meta-level support? Because I think we have gotten ourselves into a bad place by focusing so much on accomplishing specific tasks that we neglect the vital need to empower ordinary volunteers the sort who should not be asked to deal with anything technical beyond wiki markup to take charge of choosing what specific tasks should be done and providing the know-how for how to do them. Imho this is the sort of misfocus that has driven the Foundation's major software initiatives, leading to an ongoing shifting of infrastructure out of reach of ordinary volunteers. --Pi zero (discuss • contribs) 15:15, 18 April 2017 (UTC)

Book category renaming

I've somewhat revised my thinking about the size of the task of migrating the book-category names to use prefix Book:. Although it needs, I think, to be done slowly and carefully, it is probably not entirely beyond manual size. For any given book category, most of it can be achieved but, often creating a mess that needs immediate attention by a human being simply by renaming the book category (and its subsidiary categories) without leaving redirects, because {{BookCat}} and {{BOOKCATEGORY}} will figure out the move and recategorize accordingly. The mess comes with all the places where the old book-category naming conventions are hardcoded in, instead of using {{BookCat}} or {{BOOKCATEGORY}}; for example, this will probably turn up just about every case on the project of a book-specific template whose name doesn't start with the name of the book. For each book category renamed, one will have to carefully check for pages still belonging to the old category or its subcategories, and and also check for incoming links to the old category and its subcategories; and the templates will need to either be modified to use {{BOOKCATEGORY}}, or be renamed to use the book name and use {{BookCat}}. Renaming the templates will usually be desirable but a lot more work, and is a point where semi-automated assistance might be useful but it would actually be a pretty sophisticated task for an assistant. Anyway, I've got the basic support built into {{BookCat}} and {{BOOKCATEGORY}} now, and have set up one book category with the new naming convention, to start shaking the bugs out of the system. --Pi zero (discuss • contribs) 13:07, 19 April 2017 (UTC)

I'm not sure how this is going to play with the TODO mechanism (which I've never used and don't know how works though I imagine I'll be figuring it out now since I find myself with a need to know). --Pi zero (discuss • contribs)
The TODO thing turned out to be not difficult, btw.

As a matter of general edification, here are (recent) numbers of book categories under the old and new scheme; as best I can reconstruct, when I started the number of extant book categories was 2813, with two new ones created before I started tracking this here (I was going to have these generated automatically, but I don't trust magic word PAGESINCATEGORY, and besides, if I occasionally update this by hand it'll make a permanent record of the dates in the page's revision history):

2200 --> 637
--Pi zero (discuss • contribs) 23:23, 24 April 2017 (UTC) 17:30, 10 July 2017 (UTC)

Here are some notes on how to do these renamings; I've been gratified to find several other Wikibookians have pitched into help, so thought I'd share these notes here:

  • Moving a book category, say from Category:Garthok Narfling to Category:Book:Garthok Narfling, does not immediately cause the wiki software to move the pages from listing under the old name to listing under the new name.
  • If the pages of the book use templates that automatically detect the name of the book category, then the pages themselves will (after a few seconds) report that they belong to the new category; that is, the new category is listed at the bottom of the page. However, looking at the new category, the page is not listed, and looking at the old category the page is listed. This is because the wiki software generates the list on the category pages from an internal cache that is only updated either when the page is edited, or when a template used by the page is modified, or if you wait long enough eventually the wiki software should notice the change; I think there's a message somewhere that claims the software should get around to noticing these changes within about a month.
  • To do a null edit on a page, call up an edit panel on your browser, and pick the "publish" button without making any changes. That should cause the wiki software to update its cached categorization of the page. Sometimes it takes a few second for the cache to update; and occasionally I find it necessary to do a second null edit. Remember, this won't help if the page itself doesn't claim to be in the new category rather than the old one.
  • There are three general-purpose templates that detect the name of the book category. The main page of a book should always use {{subjects}}. Subpages ordinarily use {{BookCat}}; occasionally they use {{BookCat|filing=deep}}. The third template that detects the book category name is {{BOOKCATEGORY}}; some pages directly or indirectly use that for categorization. There are also some books that have book-specific templates that categorize the pages that use them, and those book-specific templates should use one of the general-purpose templates.
  • If the book category has subcategories, they have to be dealt with too.
  • There is a loose naming convention, not always observed, that subcategories of a book category should be named by the book-category name followed by a slash and a suffixing name. For example, the canonical name for the category of templates for book Garthok Narfling would be Category:Book:Garthok Narfling/Templates. If subcats use that convention, they need to be renamed when the parent category is renamed. Admins have an advantage here because the wiki software gives them an option, when moving a page, to move all of its subpages (up to 500). If the subcat uses {{BookCat}}, it will recategorize itself automatically. Often the category page needs editing to name its book correctly, usually via {{ROOTBOOKNAME}}; for example,
This category contains templates used in the '''''[[{{ROOTBOOKNAME}}]]''''' book.
{{BookCat}}
Pages in the subcat have to be induced to be relisted from the old subcat to the new one. If the subcat doesn't use this convention, one can either modify the subcat using {{BOOKCATEGORY}}, or move the subcat to use the convention. For example, a subcat Category:Garthok Nafling stubs might be left in place, with code [[{{BOOKCATEGORY|Garthok Narfling}}]]. I usually leave most subcats in place, but usually rename template subcats and image subcats.
  • Templates don't always use the naming convention Template:<bookname>/<subname>. If they don't, the template needs to be categorized using something like
[[{{BOOKCATEGORY|Garthok Narfling}}/Templates]]
Images always need treatment like this, since they never have names of the form File:<bookname>/<subname>.
  • If a book has templates, it makes sense to deal with them first, since if the template should happen to need modification in the process, that would cause the wiki software to update cache of all the pages that use the template. (This rarely works, but once e.g. I was able to avoid null-editing pages of a thousand-page book one-at-a-time by tweaking a template that was used on almost all of the thousand pages.)

--Pi zero (discuss • contribs) 23:48, 22 June 2017 (UTC)

Cookbook and WikiJunior namespaces in search results

Hi. I discovered that the namespaces for Cookbook and WikiJunior are not part of the search results on Special:Search when you are in the default mode of "Content pages". This seems accidental and/or undesirable to me. Please indicate in ticket phab:T170473 if your community would like to have this corrected. TheDJ (discuss • contribs) 20:25, 12 July 2017 (UTC)

Favor JackPotte (discuss • contribs) 21:12, 12 July 2017 (UTC)
Support Especially since if you are looking up the sort of thing that is likely a recipe, you won't be looking for it in most textbooks or manuals and vice versa. I would object if I thought there would be a lot of confusing returns but this is more likely to be helpful than harmful. —Justin (koavf)❤T☮C☺M☯ 22:10, 12 July 2017 (UTC)
Support Absolutely. Strange it wasn't already so. --Pi zero (discuss • contribs) 22:45, 12 July 2017 (UTC)

Proposal for a book on HTML 5 and CSS3

I would like to suggest a book start-up about HTML 5 and CSS 3

What would be the benefit in addition to HTML 5 Programming and Web development and Cascading Style Sheets please? JackPotte (discuss • contribs) 11:14, 24 July 2017 (UTC)
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.