Wikipedia:Bots/Requests for approval/PkbwcgsBot 5
- 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.
Operator: Pkbwcgs (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
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).
Automatic, Supervised, or Manual: Supervised
Programming language(s): AWB
Source code available: AWB
Links to relevant discussions (where appropriate):
Edit period(s): Once a week
Estimated number of pages affected: 150 to 300 a week
Namespace(s): Mainspace
Exclusion compliant (Yes/No): Yes
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 ISBN 819345670X
. 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 ISBN 995341775X
. 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 PMID 27401752
per WP:PMID. It will not make it PMID 27401752
because that format is deprecated.
Discussion
[edit]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. — xaosflux Talk 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]
- {{BAG assistance needed}} There is a huge backlog at Wikipedia:WikiProject Check Wikipedia/ISBN errors at the moment. This task can cut down on that backlog through replacing the colon with the correct syntax. It has also been waiting for two weeks. Pkbwcgs (talk) 22:12, 27 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]
- 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]
- I adjusted the RegEx to accommodate ISBNs with a colon. Pkbwcgs (talk) 20:33, 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
- @Pkbwcgs: The regex comes from PHP, but AWB (C#) doesn't support possessive quantifiers (e.g.
- 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]
- @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]
- @Pkbwcgs: After removing the colon you can use Anomie's regex from Wikipedia:Bots/Requests for approval/PrimeBOT 13:
- 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]
- @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]
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]
- @Jonesey95: I fixed those errors. Pkbwcgs (talk) 19:57, 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. — xaosflux Talk 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]
- {{OperatorAssistanceNeeded}} any update on the trialing? — xaosflux Talk 18:49, 12 March 2019 (UTC)[reply]
- @Xaosflux: I will go forward with the trial this week. Pkbwcgs (talk) 19:06, 12 March 2019 (UTC)[reply]
- @Pkbwcgs: Did you mean to disable the template? --DannyS712 (talk) 09:36, 22 March 2019 (UTC)[reply]
- @DannyS712: I will disable the template once I have done the trial. Pkbwcgs (talk) 19:18, 22 March 2019 (UTC)[reply]
- Pkbwcgs, we're at two months now - is this going anywhere? Primefac (talk) 20:49, 24 May 2019 (UTC)[reply]
- {{OperatorAssistanceNeeded}} Primefac (talk) 16:39, 9 June 2019 (UTC)[reply]
- @DannyS712: I will disable the template once I have done the trial. Pkbwcgs (talk) 19:18, 22 March 2019 (UTC)[reply]
- @Pkbwcgs: Did you mean to disable the template? --DannyS712 (talk) 09:36, 22 March 2019 (UTC)[reply]
- @Xaosflux: I will go forward with the trial this week. Pkbwcgs (talk) 19:06, 12 March 2019 (UTC)[reply]
Request Expired. Primefac (talk) 12:12, 15 June 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.