Wikipedia:LoPbN index-template generation

From Wikipedia, the free encyclopedia

Contents

[edit] Revision

Gosh, a year gone by.
I'm about to obsolete what i wrote before, without finishing it, and while the old procedure was necessary at one point and was tolerable even after that, it looks like it can be phased out. More will follow soon.
--Jerzyt 07:08, 20 November 2006 (UTC)

I'm on the third version (which i now call Mark 8), since "the old procedure" referred to in the preceding 'graph and the next section at that level (Mark V). Briefly described:

There was no page-indexing of LoPbN when it was a section of List of people.
  1. Mark I had an individually written 25-lk index on each of 26 LoPbN pages as the respective pages' top matter. These 26 indexes were prepared once, and seemingly, required no updating, as the number of pages was (supposedly) fixed.
  2. Mark II reflected many letters of the alphabet becoming initials of enough entries to justify their becoming parent pages: these contained no entries directly but instead lks to their child pages (2 to 26 to a parent) which contained the entries, and each page again had an individually written index. In the case of a parent page, the index lk'd to each of the parent's sibling pages, and to each of its children; each child page's top matter matched its parent's, except its self-lk was replaced by a linkless reference to itself, and it lk'd to its parent at the point where the parent had a linkless reference to itself. The number of child pages, however, grew as entries accumulated, and each new page resulting from subdivision of a child or parent mandated changes to the top matter of each of the new page's siblings, parent, and/or nieces. Within this phase, two minor innovations took effect: having self-lks render as plain text, and extension of the depth of the tree of pages from 1 or 2 levels below the root, to 1, 2, or 3 levels. The rendering change lessened the maintenance burden, by allowing the top-matter of childless children of a single parent to have markup identical with that of the parent. The further ramification of the tree aggravated maintenance, not only by increasing the number of pages and frequency of new ones, but bcz every new level of depth added a level to the top matter of that level's pages and their respective parents, and increased sensitivity to change.
  3. I name as Mark III a scheme where the top matter for any parent page was embodied in a template, which would serve also to provide top matter to that parent's childless children. While it reduced the number of places where an addition to the LoPbN tree's structure needed reflection, those places included the top-matter templates for each descendants of its parent that was itself a parent. (As of 2007 Mar, List of people by name: name Taylor is a parent page 7 levels below the root, and clerical errors in propagating the changes could be expected to be substantial if Mark III had not been superseded.
  4. Mark IV turned the top-matter templates of Mark III into meta-templates: the top matter template "knows" who its tree-page's ancestors are, and "receives" word of changes in each ones "nuclear family" by transcluding the same "links" template that "informs" that ancestor's other descendants. In Mark IV, however, the means of reducing typographical errors in these widely included templates was not particularly intuitive, still required significant attention to detail, and presumably discouraged use by requiring copying pieces of markup, to prepared generated markup to in turn be copied into the new or modified "links" template.
  5. Mark V created links-template as profoundly nested meta-templates. The syntax required of links-template became more intuitive, and the creation of a top-matter template for each parent page was obviated by a single template that dynamically generates the top matter, for virtually all parent pages, from arguments that are essentially the spelling of the variable portion of the parent tree-page's title. The dynamic top-matter template seems successful, but complaints suggested that for readers of the LoPbN root page (or presumably Template:List of people by name exhaustive page-index (sectioned) or its single-section counterpart, the response time was intolerable. Mark 6 thru 8 are essentially variations on the same underlying markup-generation logic, providing the same syntax as Mark V to modifiers of the LoPbN tree structure
  6. Mark 6 called for using subst'g the Mark V templates rather than transcluding them. It was cluelessly ineffective, in that this eliminated only one level of transclusion.
  7. Mark 7 called for using conditional substitution. It avoided routine evaluation of the profound nest of templates, but (response time questions aside) the profound nesting of parser functions seemed likely to be intimidating for tree-structure modifiers.
  8. Mark 8 rescues the more intuitive and terse coding of the Mark V thru 7 approaches, while falling back on Mark IV's approach of having tree-structure modifiers copy-and-paste generated markup into the links-templates' edit pages. Template talk:List of people Bur Links has not conventional discussion of the content of that page's accompanying template page, but rather code generation for that template's markup, documentation of the structure being generated, and hopefully in effect hints of how to effect the next restructuring of List of people by name: Bur's children.
    _ _ It is worth noting that List of people by name: Burl-Burz was never saved, and is not even a rdr; the need for a List of people by name: Burr page meant that that intended step became pointless. A more conventional (drawn-out) progression would have differed by dividing up a saved "Burl-Burz" page, but the links-template would have gone thru the same stages saved and documented there, and required the same insertion of "|r" into the {{Lopbn L3 by cores}} markup-generating template.
    _ _ The lks templates demonstrating Mark 8 all involve the same template, but {{Lopbn L3 by range-ends}} should be tested and ready for use in short order, no changes beyond those done for "by cores". "By cores" would suffices for about 73% of existing pages (and will be retrofitted for them). "By range-ends" should bring that up to 82%, and (without too much drama) an as yet unnamed extension of range-ends to 95%. The final 5% can be done by hand (or Mark IV), but if use of the first three templates suggests it would have value, it will be reasonable to consider further extensions of Mark 8.

--Jerzyt 04:52, 26 March 2007 (UTC)

[edit] Unfinished Original Version

[edit] Purpose of This Page

This page has been created as a first step toward a longer and more formal one. The initial need is to satisfy a substantial number of references, from comments within templates, that will be appearing. The text inside the comments will read something like

The wiki-markup on this Template:List of people ... Links page is normally neither "hand coded" nor modified "by hand"
-- even though such replacement or modification is acceptable.
Further information appears at Wikipedia: LoPbN index-template generation.
(This comment *also* appears on Template talk:List of people ... Links pages (note the "talk" in the name-space specification), which *require* hand modification.)
(In most places where it appears, this comment is "inherited" from Template:Lopbn-lz or Template:Lopbn-lrngz.)

Of course what renders here as links will there be rendered (at all) only when editing the corresponding pages, and of course rendered only as lk markup.


[edit] Procedure for Modifying Template-generating Markup in support of Division of an LoPbN Page

At this point, it may suffice to say, beyond that, that

for each so-called "[[Template:List of people ... Links]] page" that now contains such a comment (the real name may be Template:List of people Al Links, and that example will be assumed in the remainder of the following discussion of editing), its corresponding page in the Template talk: namespace (e.g. Template talk:List of people Al Links) also now exists and has a specific format.
The plan is, instead of, e.g., Template:List of people Al Links's markup being hand coded or even hand edited, for those with the patience and interest to read this to make changes by the following process:
  1. Lk to Template talk:List of people Al Links
  2. Inspect the last horizontal-line-delimited portion of the page, comparing the links there to the links on the corresponding template page. (If they don't match, fixing that is slightly beyond the initial scope of this WP: page.) The reason for changing the template: page will normally be to subdivide some main-namespace LoPbN-tree page, lk'd from the template: page, replacing the LoPbN-tree page with two or more pages whose collective scope matches the existing page's scope. In such normal cases, the existing page's scope will always be an explicit range like that of List of people by name: Alf-Alk, which covers names beginning "Alf...", "Alg...", "Alh...", "Ali...", "Alj...", or "Alk...". (That page is likely to stay a useful example because it is unlikely to soon disappear by split, but a concerted effort to list names like "al-Fayed" and "al-Tikriti" under both Alf and F (and so on), could in practice justify a split.) A split of Alf-Alk could be (especially on the short term, when the Alfonso names could be the first to crowd the others), into Alf and Alg - Alk pages, and will be assumed for the rest of this numbered list.
  3. Find the template call, in the double-braced and (usually) bolded markup, that corresponds to the range to be subdivided. In the example,
    '''<nowiki>{{subst:lopbn-lrng1|Al|f|k|l}}</nowiki>'''
    produces both the Af-Ak and the Al lks (and, even beyond this particular case of a split, it must be replaced by something that will produce at least one more lk).
  4. Edit Template talk:List of people Al Links, and start by copying the last group delimited by horizontal-rule markup, replacing the date in it, and replacing any reference to "retrofitting" to reflect this being a new version.
  5. Within that newly duplicated block, start by removing the block of double-braces markup that lacks the <nowiki> tags: this will be eventually replaced by copying the rendered version of the nowikied markup that needs the hand-editing. (If the lines begin with colons, remove the colons.)
  6. Within the nowikied markup, locate the line generating the lk for the page being subdivided -- which we previously located in the rendered version.
  7. In our case,
    '''<nowiki>{{subst:lopbn-lrng1|Al|f|k|l}}</nowiki>'''
    could be most simply replaced by
    '''<nowiki>{{subst:lopbn-l1|Alf}}</nowiki>'''
    '''<nowiki>{{subst:lopbn-lrng1|Al|g|k|l}}</nowiki>''',
    and replacing it should consist of duplicating the existing line, and editing each copy of it in a different direction.
    (For the benefit of the ambitious student, replacing the preceding line as well, i.e. using
    '''<nowiki>{{subst:lopbn-l2|Al|e|f}}</nowiki>'''
    '''<nowiki>{{subst:lopbn-lrng1|Al|g|k|l}}</nowiki>'''
    would be more compact, and would have been the natural approach if coding from scratch for the hypothetical new situation. If such broader editing were being done, it might help to start editing by duplicating one or both of the lines above and below the line responsible for the page being split. Arguably such a broader edit would be a bad choice as the goal of a modification, since it demands more of anyone trying to follow the development, without much potential reduction of future comprehension or editing effort.)
  8. Preview the result, and copy the rendered (double-braced & probably bolded) version of the markup.
  9. Paste that markup in, below
    (producing:)
  10. Preview again, comparing the rendered version below "producing" with the rendered version of Template:List of people Al Links, to be sure the new version does not introduce gaps, overlaps, or sequences out of alphabetical order, or accidentally refer to pages outside the "Al..." scope. If there are errors, the effort of wiping out what follows "producing", further editing the nowikied markup, and repeating steps 8-10 is small, and ensures avoiding inconsistencies within the new block between the horizontal rules that will be unexpected and whose recognition and correction may be psychologically tricky.
  11. Once the preview looks good, make sure there are no "return" characters (but only blanks) between the double-braced templated calls. (If there are returns, copy (from the edit pane) the freshly edited version of the markup, in place of the copy of the rendered version of the nowikied markup.)
  12. Save the template talk: page (Template talk:List of people Al Links), paste the (latest) copied markup in as the whole content of the template: page (Template:List of people Al Links) edit pane, and save.