Wikipedia:Bots/Requests for approval/FireflyBot 13
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Approved.
Operator: Firefly (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 16:58, Sunday, June 27, 2021 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available: Coming soon!
Function overview: Effectively substitute all uses of {{date}} in mainspace only, as it should not be used there.
Links to relevant discussions (where appropriate): Here, opened concurrently with the BRFA, which in hindsight probably wasn't the best plan. I've suggested that discussion should probably happen here purely to keep things streamlined.
Edit period(s): One time run
Estimated number of pages affected: ~10,000, see this search
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): Yes
Function details: {{date}} shouldn't be used in mainspace, per its documentation (technically the documentation says that it "should only be used internally in other templates", but let's start with mainspace), and some of the uses are just plain silly - things like {{date|2003}}
to render 2003
.
This task would go through all transclusions in mainspace and substitute the template invocation for the output wikitext. Given the template is often used in reference tags, and that phab:T4700 is (still) a thing, the bot won't directly subst: the template, rather it will get the resultant wikitext via an API call and replace the template invocation with it.
I realise that this is technically a COSMETICBOT task given that it doesn't affect the output, however I'm hoping for some latitude here given that the task would be correcting misuse (and often completely pointless use) of a template.
Discussion
[edit]- For the "technical competence" part of the discussion, here are some example edits the bot would make. firefly ( t · c ) 17:36, 27 June 2021 (UTC)[reply]
- This task wouldn't be cosmetic in the case of {{date}} with no parameters, which is used in ~240 articles. These cases would be caused to not update any more. Many of those uses are probably just mistakes, but some, like President of Italy § Living former president, are intentional. Whether having an auto-updating date in an article is a good thing or a bad thing I don't know, but it may be good to keep in mind. – Rummskartoffel 18:04, 27 June 2021 (UTC)[reply]
- Good point, they can be excluded easily enough. firefly ( t · c ) 18:06, 27 June 2021 (UTC)[reply]
- That use in President of Italy is not valid, IMO. When that living person dies, the article will immediately be inaccurate, but nobody will notice. It's better to use {{as of}} or a similar template. – Jonesey95 (talk) 18:17, 27 June 2021 (UTC)[reply]
- Jonesey95, I entirely agree, but they shouldn't be included in this bot run, as they require a different fix. I can note them somewhere for human eyes. firefly ( t · c ) 18:23, 27 June 2021 (UTC)[reply]
- Yes, please. Let's see how many there are. – Jonesey95 (talk) 18:33, 27 June 2021 (UTC)[reply]
- Jonesey95, I entirely agree, but they shouldn't be included in this bot run, as they require a different fix. I can note them somewhere for human eyes. firefly ( t · c ) 18:23, 27 June 2021 (UTC)[reply]
- That use in President of Italy is not valid, IMO. When that living person dies, the article will immediately be inaccurate, but nobody will notice. It's better to use {{as of}} or a similar template. – Jonesey95 (talk) 18:17, 27 June 2021 (UTC)[reply]
- Good point, they can be excluded easily enough. firefly ( t · c ) 18:06, 27 June 2021 (UTC)[reply]
- This has been a perennial discussion for years, glad to see it finally addressed:
- It's usage in most cases is pointless at best and error prone at worst. -- GreenC 18:21, 27 June 2021 (UTC)[reply]
- As shown in the latter discussion, that guidance was added without discussion, apparently, although I agree with its apparent meaning. As I said in that discussion, and as GreenC says, this template is rarely used in a way that makes a lot of sense. I wonder if it should be deprecated if we can find other ways to replace it. With 45K transclusions (600 in template space, many of them terrible), it won't be a small project. – Jonesey95 (talk) 18:33, 27 June 2021 (UTC)[reply]
- I'm wondering if it would be sensible to split the template in two - have one template that performs the clean-up and formatting and one template that produces the current date. I can think of cases where it might be sensible to use the template to put dates into articles, but all the clean-up and formatting functionality only really makes sense as part of other templates in my opinion. 192.76.8.91 (talk) 19:57, 27 June 2021 (UTC)[reply]
- "the current date" == Category:Time, date and calendar templates -- GreenC 20:33, 27 June 2021 (UTC)[reply]
- So far as we know, there are always better options relative to this template. Izno (talk) 21:57, 27 June 2021 (UTC)[reply]
- I'm wondering if it would be sensible to split the template in two - have one template that performs the clean-up and formatting and one template that produces the current date. I can think of cases where it might be sensible to use the template to put dates into articles, but all the clean-up and formatting functionality only really makes sense as part of other templates in my opinion. 192.76.8.91 (talk) 19:57, 27 June 2021 (UTC)[reply]
- As shown in the latter discussion, that guidance was added without discussion, apparently, although I agree with its apparent meaning. As I said in that discussion, and as GreenC says, this template is rarely used in a way that makes a lot of sense. I wonder if it should be deprecated if we can find other ways to replace it. With 45K transclusions (600 in template space, many of them terrible), it won't be a small project. – Jonesey95 (talk) 18:33, 27 June 2021 (UTC)[reply]
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Primefac (talk) 01:21, 2 July 2021 (UTC)[reply]
- Trial complete. Edits here. One error owing to my fat-fingering of the "no parameters" check, swiftly reverted and code fixed. firefly ( t · c ) 15:07, 3 July 2021 (UTC)[reply]
- Sorry for the delay in responding to this, but would you mind linking to the specific diffs? The contribs link you've provided seems to have moved on to other things. Primefac (talk) 18:51, 20 July 2021 (UTC)[reply]
- Primefac, sorry, I must've forgotten to provide a permalink. See here - scroll about 2/3 of the way down and you'll see them, or CTRL+F "Template:Date". firefly ( t · c ) 08:01, 22 July 2021 (UTC)[reply]
- Still not seeing it... Primefac (talk) 16:27, 20 September 2021 (UTC)[reply]
- @Primefac: [Butting in because I was curious] The contributions are here -- John of Reading (talk) 16:38, 20 September 2021 (UTC)[reply]
- Approved. Sorry for the delay. Primefac (talk) 17:32, 20 September 2021 (UTC)[reply]
- @Primefac: [Butting in because I was curious] The contributions are here -- John of Reading (talk) 16:38, 20 September 2021 (UTC)[reply]
- Still not seeing it... Primefac (talk) 16:27, 20 September 2021 (UTC)[reply]
- Primefac, sorry, I must've forgotten to provide a permalink. See here - scroll about 2/3 of the way down and you'll see them, or CTRL+F "Template:Date". firefly ( t · c ) 08:01, 22 July 2021 (UTC)[reply]
- Sorry for the delay in responding to this, but would you mind linking to the specific diffs? The contribs link you've provided seems to have moved on to other things. Primefac (talk) 18:51, 20 July 2021 (UTC)[reply]
- Trial complete. Edits here. One error owing to my fat-fingering of the "no parameters" check, swiftly reverted and code fixed. firefly ( t · c ) 15:07, 3 July 2021 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.