Template talk:32stories
From Wikipedia, the free encyclopedia
Contents |
[edit] Comma Separated List templates
- This is a needs discussion
- moved from user talk:CBDunkerson#Comma Separated List templates
- at this date/time by FrankB 18:17, 13 November 2007 (UTC)
Can you direct me to (or write for me) the guts of a template (showing comma list parsing) which will separate two fields of nn (Ten is a realistic max) data pairs.
- This diff shows the "need point" as {{32stories|GG01,"Biting Time"}}, the purpose being to list the contributions and back links to the story by author. (She's got a tale in just about every other anthology, so this example with a population of one will grow soon!) The anthology templates (GG01, GG03..., GGnn) will be updated as to the same logic of {{ROF-1}} (&& {{Ring of Fire}}), so the first field is that template name, the second the "|s= title field". [I'll get to "updating" the "outdated" usage eventually... once I've proved a few more applications.]
- I hate to ask but the series unfortunately will have 17 anthologies by January with one coming out every two months now that they've reorganized as a professional sci-fi e-zine and hit stride. I'd like to stay focused on data content entries as much as possible this week, so I'll ask if you're willing "to take the contract".
- I know I've seen some things here and there that are using comma separated lists processing, but can't recall where off the top of my head. Ahh - tributaries processing ... See ... find: {{{tributary_left|}}} | {{Geobox row | 1 | {{{tributary_right}}} }} {{!}} - left {{!}} {{Geobox link which looks like the part of the magic is in , and the rest in that code head I quoted (well down in the template page).
- Any improvements suggestions in the concept given this need sketch welcomed! // FrankB 20:39, 12 November 2007 (UTC)
-
- If I understand correctly, you are looking for a way to parse something like {{templateName|a, b, c, d}} out into separate 'a', 'b', 'c', and 'd' parameters. Currently there is no way in Wikipedia to 'split' a parameter text string apart like that. A string based series of parserfunctions exists and could be used to do that, but it hasn't been implemented in the mediawiki software yet and may never be. What {{Geobox river}} is doing is adding a ',' between different elements in a list... similar to . That said, if the goal is to get 'Biting Time' passed to GG01 as an 's' parameter, 'Whatever' passed to GG02, 'Something else' passed to GG03, and so on then it can be done with {{32stories|GG01=Biting Time|GG02=Whatever|GG03=Something else}}. I created the template based on that design... though it could also have been done as just, {{32stories|Biting Time|Whatever|Something else}}. I'm guessing you want the 'GG#' statements in there to help keep clear which title goes to which anthology number. --CBD 07:37, 13 November 2007 (UTC)
[edit] Clearer needs definition
-
-
- Actually, my syntax was assuming {{32stories|ROF-1, Biting Time|GG03, Whatever|GG07, Something else}} where the output would likely be a two column format of "Story title" in "Book Title", sans link as the book, but where the books title forms a section link to the synopses of the book on the GG/ROF pages... but since there's no backlog to change over, whatever allows me to take a step in that direction is a plus. Think of it this way, the authors page or section links back to the shorts, the shorts link back to the authors. Both conserve space and provide the formatting and glue words... if you recall the nn and nl options in {{35TCL}} and {{1635:TCL}} then the non-linked name following is those, the Story link is same given "s="{{{parm}}} :
-
[edit] Examples
Since CSL is infeasible, figuring pairs of numeric parameters...
{{Top}}
*''In "titlelink call to the given template" (Bookname ... the non-linked 'given template output')''
[Expanded line assuming this kind of call is feasible:
''In'' {{{{{1}}}|s={{{2}}}|I}} ({{{{{1}}}|nl=1|nn=1|i}})
]
{{Mid}}
*''In "titlelink2 call to the given template" (Bookname ... the non-linked 'given template2 output')''
{{Bottom}}
- Series short story contributions
|
|
|
Note I dropped the "In" once I saw the dummied in example outputs. Shrug!
[edit] Template
Ok, I updated the template. If you put in, {{32stories|ROF-1|The Wallenstein Gambit|GG01|Portraits|GG02|Steps in the Dance|GG03|Postage Due|ROF-2|The Austro-Hungarian Connection}} you will get; Series short story contributions:
|
I think the 's' links on the Grantville Gazette ones just haven't been updated with the ROF-1 style code. If that's the kind of thing you are looking for then this should work so long as no author has more than one story in any given anthology. I looked around a little, but didn't see any cases where an author had two in the same anthology. --CBD 22:04, 13 November 2007 (UTC)
[edit] Aside point
-
-
- The book 1634: The Ram Rebellion is a strange duck in reality being a collection of short fiction, but all having an overarching plotline, so is classed as a novel... thus need to cover the short stuff in there makes the (so far) one hybrid form of template in the stable— calls to it would I would think be able to invoke the nonum option, which is not a prefix to any of the pure anthologies... making the difference between the novels and anthologies templates as I divide them in my mind. In practice, any code for handling the number prefix I usually just comment out or delete, allowing me to maintain a stock template and then globally search and replace three strings to prep for pasting that into a related template page. (Doing that process twice 1) for the GG##/34XXX form and 2) long name forms is of course needful.)... which is why the interest in a single pair of templates to do the parsing and output last week. The calling templates would be trivial and drops the maintenance to only two "in common" templates. The size problem (focus) should only be a factor in 1632 characters, however that already large page evolves. At the moment, it looks likely to split, causing a split need in such as {{16char}}... perhaps a {{16chrR}} for real historical chars to link historic figures where-ever they are expanded upon with respect to the series treatments of same.
-
[edit] 1632 writers
-
- At the writers we get an accumulation of contributions with links (The part I put in quotes, as that's the section title-lines in the articles), giving some indication of how influential the writer has been indirectly in setting series cannon...
or perhaps allows a summary like Despite fifteen stories in the Grantville Gazettes, Fred Brady's tales haven't deal with either technical or societal issues, but only on interpersonal and personal problems as seen by individuals at their ground level view—what Flint called "Soap Operas" in the forward of Grantville Gazette VI—...
This can be handled by pairs of pipe separated inputs using the numeric vice the CSL formatting, which I felt would be clearer to non-tech savvy editors.
- At the writers we get an accumulation of contributions with links (The part I put in quotes, as that's the section title-lines in the articles), giving some indication of how influential the writer has been indirectly in setting series cannon...
-
- Bottom line, the data is pairs, and what you put together is a good start on a sub-template for the individual row of the tables using the above format... somewhere in the needed processing there, the list needs divided, and the two sub-templates providing the guts of the table per the above would by what you put up with appropriate fiddling. That works out as the called template which does the division and provides the Top/Mid/Bottom shell, the listbyhalfs template which populates each half of that, something along the lines of my {{catlst}} or {{cat also}} code..., and your modified output line template. In short, as I think on this now, we're discussing something on the size order of most infoboxes with respect to pre-expand logic... assuming you've no better implementation scheme that comes to mind given the desires compared to my "BRUTE FORCE" thinking. (Missing recursion here! <G>)
-
- The difficult part is how to efficiently code the divide by two (to establish the bounds of the two half lists) and handle the irregular case of odd numbers of stories. Some recursion capability would be a real boon... can that be accomplished in some way?
-
-
- [I would assume a pair count of odd, would populate the first part of the list.]
-
-
- I would think an if chain like in {{catlst}} could be adapted to return the number of the maximum ifdefined numeric parameters given we can bless the general mode of workings of some my calling templates like Template:Wpd-catlist in a switch... and not get the issues we had in the 35TCL calls to 1635:TCL.
-
-
- [Note, as the use of this template will primarily be on the one 1632 writers page, and perhaps the dedicated authors page of an established writer (e.g. David Weber, Eric Flint, Mercedes Lackey), SIZE pre or post expansion really won't be a factor. They all tend to be shortish articles, and the many occurences in writes shouldn't overflow, as there aren't a whole lot of reasons to have lot's of templates in biographical snippets... Anyone truly noteworthy will have their own main article like Flint, DeMarce, Weber, et al.]
-
-
- In any event, this is a backburner thing for I need to stay focused in article space. I want a working shell and plan that's good enough for now... call it creative vaporware! (See {{32FC}} <G>)
-
- I'll comment out or adapt your effort so I can add to articles figuring the ...|BOOK|"section title sublink"|... formating mode vice CSLs, and deal with it in December. [or we can move it and make the redirect page vaporware, preserving ability to work on it. Say template:32stories output or something suitably short and "sub-templatish"... template:32st-out ???
-
-
- (Your call... I'll use the current name in my articles and figure on vanishing code in the current name, should you choose to go forward. ...I'm on vacation in Florida from Saturday for a week, and will only be able to work stuff off-line, save perhaps in spurts of uploads/paste-ins. Hopefully the contractor will be done with my office by Christmas! I miss my other computers and even email a little! <g> Having half my stuff buried away under plastic has been far more than one problem!)
-
-
-
- Getting the code to put in a 'mid point' based on the number of parameters set would be fairly complicated. For right now I just used a two column formatting style. It looks slightly different, but accomplishes the same general task. --CBD 22:37, 13 November 2007 (UTC)
-

