Wikipedia:Bots/Requests for approval/Legobot 5
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
Automatic or Manually Assisted: Automatic supervised
Programming Language(s): Python using Pywikipedia
Function Summary: Replacing deprecated templates with {{coord}} (BOTREQ)
Edit period(s) (e.g. Continuous, daily, one time run): Should be a one time run.
Already has a bot flag (Y/N): Y
Function Details:
- Change all instances of {{coor d}}, {{coor dm}} and {{coor dms}} by simply changing the letters in the first part (
coor
,coor dm
orcoor dms
), tocoord
. - Change all instances of {{coor at d}}, {{coor at dm}} and {{coor at dms}} by changing the letters in the first part, as above, and appending a
|display=inline,title
parameter. - Changing
{{Geolinks-cityscale}}
,{{Geolinks-US-hoodscale}}
,{{Mapit-US-cityscale}}
to{{coord}}
Discussion
[edit]This will be running of off the latest dump. I made a test edit here. LegoKontribsTalkM 22:19, 27 September 2008 (UTC)[reply]
- You may also want to consider replacing some older templates, like Geolinks and Mapit, though I think their usage is pretty low. Other than that, it sounds good, would you mind posting the regexes it uses? Mr.Z-man 04:11, 30 September 2008 (UTC)[reply]
- It is finding
{{coor at dms(.*?)}}
{{coor at dm(.*?)}}
{{coor at d(.*?)}}
and replacing with{{coord|display=inline,title\\1}}
for the first one, and{{coor dms(.*?)}}
{{coor dm(.*?)}}
{{coor d(.*?)}}
with{{coord\\1}}
LegoKontribsTalkM 00:05, 1 October 2008 (UTC)[reply]- All instances of coor at * must have
|display=inline,title
. I trust that your final example should be{{coor d(.*?)}}
, not{{coor at d(.*?)}}
. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 16:39, 1 October 2008 (UTC)[reply]
- All instances of coor at * must have
- It is finding
←Sorry, that is what I meant, also, I can do {{Geolinks-cityscale}}
, {{Geolinks-US-hoodscale}}
, {{Mapit-US-cityscale}}
LegoKontribsTalkM 03:34, 2 October 2008 (UTC)[reply]
- Thank you again. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 17:30, 2 October 2008 (UTC)[reply]
Pages with {{geolinks-US-cityscale}}, etc. need more fixes than just conversion to {{coord}}, see Wikipedia talk:GEO#Coordinates_in_US_cities_articles:_where_to_display. -- User:Docu
- Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Mr.Z-man 17:44, 8 October 2008 (UTC)[reply]
- Approved. Mr.Z-man 03:17, 2 November 2008 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.