Does anyone have a bot that could be used to change/update parameters to a template? The specific task I have in mind is to split references to the subdivision_type/subdivision_name parameters to template:Infobox City that include embedded <br>s to use inidividual pairs of parameters for each "row" of these. For example, many invocations of this template currently look like:
{{Infobox City ... |subdivision_type = Country<br>State |subdivision_name = United States<br>California ... }}
which creates two "rows" within a single row of the resultant HTML table. My understanding is that most screen readers read tables row by row, cell by cell, so would read this as "country state, united states california" rather than as indicated by the visual appearance, which would be "country united states, state california". I've added additional pairs of parameters so in the structure of the HTML table these entries can be separate rows, which requires changing the example above to
{{Infobox City ... |subdivision_type = Country |subdivision_type1 = State |subdivision_name = United States |subdivision_name1 = California ... }}
There are roughly 2000 references to template:Infobox City. Lacking a bot to do this, I've started doing this by hand and have convened a project to manually go through every reference to this template and update per the above (see Template talk:Infobox City/links). Note that the precise format for the template parameter reference varies considerably, and there are a variable number of "virtual rows" (I haven't seen more than 3 yet, but who knows?). I'd also be interested in such a bot flagging articles for further examination if any other parameters have the string "<br>" in them.
If anyone has a bot they've used to manipulate template parameters, please let me know. Given how long it might take to do this by hand, I think I'd be willing to modify an existing bot to do this.
Thanks. -- Rick Block ( talk) 16:42, 4 September 2006 (UTC)
Find: |subdivision_type = (.*?)<br>(.*?) Replacewith: |subdivision_type = $1\r\n|subdivision_type1 = $2
or something similar should do the job. Martin 17:04, 4 September 2006 (UTC)
Find: |[\s]*subdivision_type[\s]*=[\s]*(.*?)<br>(.*?) Replacewith: |subdivision_type = $1\r\n|subdivision_type1 = $2
I have a confirmation question: what should be done to Davenport, Iowa? There we currently have
|subdivision_name = [[United States]]<br>[[Iowa]]<br>[[Scott County, Iowa|Scott County]]
Am I correct in assuming this should be transformed to:
|subdivision_name = [[United States]] |subdivision_name1 = [[Iowa]] |subdivision_name2 = [[Scott County, Iowa|Scott County]]
? -- Ligulem 00:54, 5 September 2006 (UTC)
|subdivision_type = [[Countries of the world|Country]] |subdivision_type1 = [[Political divisions of the United States|State]] |subdivision_type2 = [[List of counties in Iowa|County]]
I started creating some MWB settings at User:Ligulem/work/Infobox City. I did this edit, with these settings. Will sure need more subcases for 2 and one br separated info pieces. This one worked for the full tripple case (two br's). -- Ligulem 13:31, 5 September 2006 (UTC)
In Concord, New Hampshire there is:
| leader_title = [[City Manager]]<br>Legislative body | leader_name = Thomas J. Aspell, Jr.<br>[[City Council]]
There are no leader_title1, leader_name1 params in the template. Ok, you said only subdivision_name and subdivision_type should be changed, right? So I'll move on with my list, ignoring that. -- Ligulem 14:38, 5 September 2006 (UTC)
On Dayton, Ohio ( diff) I had to manually remove a series of . If this should show up more often, I'll try to integrate that into the rules. -- Ligulem 14:54, 5 September 2006 (UTC)
New uncovered case: Ajax, Ontario:
|leader_title = Mayor<br>Governing Body<br>[[Member of Parliament|MP]]<br>[[Member of Provincial Parliament|MPPs]] |leader_name = Steve Parish<br>Ajax Town Council<br>[[Mark Holland]] ([[Ajax-Pickering]])<br>[[Christine Elliott]] ([[Whitby-Ajax]])<br>[[Wayne Arthurs]] ([[Pickering—Ajax—Uxbridge]])
Needs up to leader_title3/leader_name3. Do you update the template? -- Ligulem 18:17, 5 September 2006 (UTC)
Just as a side note: this task here is definitely not "bottable". Too many special cases. However, with MWB this is much faster to do than with pure manual editing. But great care must be exercised and each page manually checked. 2057 pages left to go. -- Ligulem 00:17, 6 September 2006 (UTC)
I think I'll give up listing Canadian cities with problems caused by leader issues. These are epidemic. -- Ligulem 22:52, 8 September 2006 (UTC)
Re [1]: I do hereby promise to finish this bot task, but it *is* very time consuming (even with MWB). There are tons of exceptional cases that need hand tweaking. I also have to carefully check each diff (in order not to loose my good bot reputation/license — I have a bunch of serial edit haters, that watch after me and my AWB colleages ;-). I also have some ideas to change MWB to make work like this easier. In short: a lot that could be done. I could also speed up my edits because I do have to wait at least 20 seconds between two consecutive edits. In theory, this value is at 30s per WP:BOTS. But I'm enough bold to go down to 20 seconds. If I have a series of no problem edits I could go with around 7..10 seconds per page. Instead, I do have to sit watching my timer until it is on 20 seconds and then click on save. I must say, MWB work could be made a bit easier, if we had a bit less red tape instruction creep and self declared police officers on this project here. Just some infos for the non-botters. -- Ligulem 09:13, 10 September 2006 (UTC)
Task completed (I did approx. 500 edits) --
Ligulem 22:32, 10 September 2006 (UTC)
All fixed (including Washington, D.C.).
|established_title = <!-- Settled --> |established_date = |established_title2 = <!-- Incorporated (town) --> |established_date2 = |established_title3 = <!-- Incorporated (city) --> |established_date3 =
Does anyone have a bot that could be used to change/update parameters to a template? The specific task I have in mind is to split references to the subdivision_type/subdivision_name parameters to template:Infobox City that include embedded <br>s to use inidividual pairs of parameters for each "row" of these. For example, many invocations of this template currently look like:
{{Infobox City ... |subdivision_type = Country<br>State |subdivision_name = United States<br>California ... }}
which creates two "rows" within a single row of the resultant HTML table. My understanding is that most screen readers read tables row by row, cell by cell, so would read this as "country state, united states california" rather than as indicated by the visual appearance, which would be "country united states, state california". I've added additional pairs of parameters so in the structure of the HTML table these entries can be separate rows, which requires changing the example above to
{{Infobox City ... |subdivision_type = Country |subdivision_type1 = State |subdivision_name = United States |subdivision_name1 = California ... }}
There are roughly 2000 references to template:Infobox City. Lacking a bot to do this, I've started doing this by hand and have convened a project to manually go through every reference to this template and update per the above (see Template talk:Infobox City/links). Note that the precise format for the template parameter reference varies considerably, and there are a variable number of "virtual rows" (I haven't seen more than 3 yet, but who knows?). I'd also be interested in such a bot flagging articles for further examination if any other parameters have the string "<br>" in them.
If anyone has a bot they've used to manipulate template parameters, please let me know. Given how long it might take to do this by hand, I think I'd be willing to modify an existing bot to do this.
Thanks. -- Rick Block ( talk) 16:42, 4 September 2006 (UTC)
Find: |subdivision_type = (.*?)<br>(.*?) Replacewith: |subdivision_type = $1\r\n|subdivision_type1 = $2
or something similar should do the job. Martin 17:04, 4 September 2006 (UTC)
Find: |[\s]*subdivision_type[\s]*=[\s]*(.*?)<br>(.*?) Replacewith: |subdivision_type = $1\r\n|subdivision_type1 = $2
I have a confirmation question: what should be done to Davenport, Iowa? There we currently have
|subdivision_name = [[United States]]<br>[[Iowa]]<br>[[Scott County, Iowa|Scott County]]
Am I correct in assuming this should be transformed to:
|subdivision_name = [[United States]] |subdivision_name1 = [[Iowa]] |subdivision_name2 = [[Scott County, Iowa|Scott County]]
? -- Ligulem 00:54, 5 September 2006 (UTC)
|subdivision_type = [[Countries of the world|Country]] |subdivision_type1 = [[Political divisions of the United States|State]] |subdivision_type2 = [[List of counties in Iowa|County]]
I started creating some MWB settings at User:Ligulem/work/Infobox City. I did this edit, with these settings. Will sure need more subcases for 2 and one br separated info pieces. This one worked for the full tripple case (two br's). -- Ligulem 13:31, 5 September 2006 (UTC)
In Concord, New Hampshire there is:
| leader_title = [[City Manager]]<br>Legislative body | leader_name = Thomas J. Aspell, Jr.<br>[[City Council]]
There are no leader_title1, leader_name1 params in the template. Ok, you said only subdivision_name and subdivision_type should be changed, right? So I'll move on with my list, ignoring that. -- Ligulem 14:38, 5 September 2006 (UTC)
On Dayton, Ohio ( diff) I had to manually remove a series of . If this should show up more often, I'll try to integrate that into the rules. -- Ligulem 14:54, 5 September 2006 (UTC)
New uncovered case: Ajax, Ontario:
|leader_title = Mayor<br>Governing Body<br>[[Member of Parliament|MP]]<br>[[Member of Provincial Parliament|MPPs]] |leader_name = Steve Parish<br>Ajax Town Council<br>[[Mark Holland]] ([[Ajax-Pickering]])<br>[[Christine Elliott]] ([[Whitby-Ajax]])<br>[[Wayne Arthurs]] ([[Pickering—Ajax—Uxbridge]])
Needs up to leader_title3/leader_name3. Do you update the template? -- Ligulem 18:17, 5 September 2006 (UTC)
Just as a side note: this task here is definitely not "bottable". Too many special cases. However, with MWB this is much faster to do than with pure manual editing. But great care must be exercised and each page manually checked. 2057 pages left to go. -- Ligulem 00:17, 6 September 2006 (UTC)
I think I'll give up listing Canadian cities with problems caused by leader issues. These are epidemic. -- Ligulem 22:52, 8 September 2006 (UTC)
Re [1]: I do hereby promise to finish this bot task, but it *is* very time consuming (even with MWB). There are tons of exceptional cases that need hand tweaking. I also have to carefully check each diff (in order not to loose my good bot reputation/license — I have a bunch of serial edit haters, that watch after me and my AWB colleages ;-). I also have some ideas to change MWB to make work like this easier. In short: a lot that could be done. I could also speed up my edits because I do have to wait at least 20 seconds between two consecutive edits. In theory, this value is at 30s per WP:BOTS. But I'm enough bold to go down to 20 seconds. If I have a series of no problem edits I could go with around 7..10 seconds per page. Instead, I do have to sit watching my timer until it is on 20 seconds and then click on save. I must say, MWB work could be made a bit easier, if we had a bit less red tape instruction creep and self declared police officers on this project here. Just some infos for the non-botters. -- Ligulem 09:13, 10 September 2006 (UTC)
Task completed (I did approx. 500 edits) --
Ligulem 22:32, 10 September 2006 (UTC)
All fixed (including Washington, D.C.).
|established_title = <!-- Settled --> |established_date = |established_title2 = <!-- Incorporated (town) --> |established_date2 = |established_title3 = <!-- Incorporated (city) --> |established_date3 =