The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at
WT:BRFA. The result of the discussion was Request Expired.
Time filed: 09:15, Thursday, December 13, 2018 (
UTC)
Function overview: The bot will fix ISBN syntax per
CW Error #69 (ISBN with incorrect syntax) and PMID syntax per
CW Error #102 (PMID with incorrect syntax).
Function details: The bot is going to fix incorrect ISBN syntax per
WP:ISBN. So, if the syntax is ISBN: 819345670X, it will take off the colon and make it ISBN819345670X. The other case of incorrect ISBN syntax this bot is going to fix is when the ISBN number is preceded by "ISBN-10" or "ISBN-13". For example, in ISBN-10: 995341775X, it will take off "-10:" and that will make it ISBN995341775X. The bot will only fix those two cases of ISBN syntax. Any other cases of incorrect ISBN syntax will not be fixed by the bot. The bot will also fix incorrect PMID syntax. So, for example, if it is PMID: 27401752, it will take off the colon and convert it to PMID27401752 per
WP:PMID. It will not make it PMID 27401752 because that format is deprecated.
Discussion
Please make sure to avoid ISBNs within |title= parameters of citation templates. Also, is there a reason that you are not proposing to use the {{ISBN}} template? Magic links have been deprecated and are supposed to go away at some point, although the WMF seems to be dragging their feet for some reason. There is another bot that converts magic links to templates, but if you can do it in one step, that would probably be good. –
Jonesey95 (
talk) 12:05, 13 December 2018 (UTC)reply
@
Jonesey95: The bot will convert to the {{ISBN}} template and it will not touch ISBNs in the title parameters of citations.
Pkbwcgs (
talk) 15:19, 13 December 2018 (UTC)reply
What about the PMID's? Creating more deprecated magic words isn't ideal. —
xaosfluxTalk 19:16, 14 December 2018 (UTC)reply
@
Xaosflux: I did say that was going to happen in my description that they will be converted to templates. However, now I need to code in RegEx and I have been trying to code that but my RegEx skills are unfortunately not very good.
Pkbwcgs (
talk) 19:52, 14 December 2018 (UTC)reply
I have tried coding in RegEx but I have gave up soon after as it is too difficult.
Pkbwcgs (
talk) 21:14, 14 December 2018 (UTC)reply
@
Pkbwcgs: After removing the colon you can use
Anomie's regex from
Wikipedia:Bots/Requests for approval/PrimeBOT 13: \bISBN(?:\t| |&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs})++((?:97[89](?:-|(?:\t| |&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs}))?)?(?:[0-9](?:-|(?:\t| |&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs}))?){9}[0-9Xx])\b and \b(?:RFC|PMID)(?:\t| |&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs})++([0-9]+)\b, or you can adjust them to account for the colon.
Primefac could advise if he made any changes to them. —
JJMC89 (
T·C) 06:27, 15 December 2018 (UTC)reply
@
JJMC89: Thanks for the RegEx. I will be able to remove the colon easily. It is the RegEx for the ISBN that I struggled with. Thanks for providing it.
Pkbwcgs (
talk) 09:49, 15 December 2018 (UTC)reply
It is saying "nested identifier" and it is not replacing when I tested the RegEx on my own AWB account without making any edits.
Pkbwcgs (
talk) 09:53, 15 December 2018 (UTC)reply
@
Pkbwcgs: The regex comes from PHP, but AWB (C#) doesn't support possessive quantifiers (e.g. ++). Replacing ++ with + in the regex should work. —
JJMC89 (
T·C) 18:57, 15 December 2018 (UTC)reply
@
JJMC89: I have tested the find RegEx on my AWB account without making any edits and it works. I also worked out the replace RegEx and it is {{ISBN|$1}}. That works too. I think this is ready for a trial. I will also request a small extension for this task which is to clean out
Category:Pages using ISBN magic links and
Category:Pages using PMID magic links. That will be PkbwcgsBot 7.
Pkbwcgs (
talk) 20:15, 15 December 2018 (UTC)reply
I adjusted the RegEx to accommodate ISBNs with a colon.
Pkbwcgs (
talk) 20:33, 15 December 2018 (UTC)reply
This diff from my account is good and perfectly justifies what this bot is going to do for this task. Is this good enough?
Pkbwcgs (
talk) 20:53, 15 December 2018 (UTC)reply
This is what it will look like if the bot handles an ISBN with the "ISBN-10" prefix. That diff is also from my account.
Pkbwcgs (
talk) 21:08, 15 December 2018 (UTC)reply
Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. --
slakr\
talk / 20:43, 4 January 2019 (UTC)reply
The first thirteen edits are
here.
Pkbwcgs (
talk) 09:54, 12 January 2019 (UTC)reply
This edit put the ISBN template inside an external link, which is an error.
This one has the same error. The other eleven edits look good to me. I recommend a fix to the regex and more test edits. –
Jonesey95 (
talk) 19:51, 12 January 2019 (UTC)reply
Approved for extended trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. OK try again. —
xaosfluxTalk 04:10, 30 January 2019 (UTC)reply
I apologise for the delay to the trial of this task. I will do the trial as soon as I can.
Pkbwcgs (
talk) 11:00, 22 February 2019 (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
WT:BRFA.