Wikipedia:Bots/Requests for approval/PkbwcgsBot 5
[[User:PkbwcgsBot|PkbwcgsBot 5]]
{{Newbot|PkbwcgsBot|5}}
Operator: {{botop|Pkbwcgs}}
Time filed: 09:15, Thursday, December 13, 2018 (UTC)
Function overview: The bot will fix ISBN syntax per {{CW|69}} (ISBN with incorrect syntax) and PMID syntax per {{CW|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=
Please make sure to avoid ISBNs within {{para|title}} parameters of citation templates. Also, is there a reason that you are not proposing to use the {{tl|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)
: {{re|Jonesey95}} The bot will convert to the {{tl|ISBN}} template and it will not touch ISBNs in the title parameters of citations. Pkbwcgs (talk) 15:19, 13 December 2018 (UTC)
: What about the PMID's? Creating more deprecated magic words isn't ideal. — xaosflux Talk 19:16, 14 December 2018 (UTC)
:: {{re|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)
::: 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)
:::: {{yo|Pkbwcgs}} After removing the colon you can use {{U|Anomie}}'s regex from Wikipedia:Bots/Requests for approval/PrimeBOT 13:
and
, or you can adjust them to account for the colon. {{U|Primefac}} could advise if he made any changes to them. — JJMC89 (T·C) 06:27, 15 December 2018 (UTC)
::::: {{re|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)
:::::: 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 to|Pkbwcgs}} The regex comes from PHP, but AWB (C#) doesn't support possessive quantifiers (e.g. {{code|++}}). Replacing {{code|++}} with {{code|+}} in the regex should work. — JJMC89 (T·C) 18:57, 15 December 2018 (UTC)
:::::::: {{re|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
. 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)
::::::::: I adjusted the RegEx to accommodate ISBNs with a colon. Pkbwcgs (talk) 20:33, 15 December 2018 (UTC)
:::::::::: [https://en.wikipedia.org/w/index.php?title=Action_off_Lofoten&diff=prev&oldid=873900541 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)
::::::::::: [https://en.wikipedia.org/w/index.php?title=Ali_Talib_(artist)&diff=prev&oldid=873901062 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)
:::::::::::: {{tl|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)
{{BotTrial|edits=25}} --slakr\ talk / 20:43, 4 January 2019 (UTC)
: The first thirteen edits are [https://en.wikipedia.org/w/index.php?title=Special:Contributions&dir=prev&offset=20190105130748&limit=13&contribs=user&target=PkbwcgsBot&namespace=0&tagfilter=&start=2019-01-06&end=2019-01-06 here]. Pkbwcgs (talk) 09:54, 12 January 2019 (UTC)
::[https://en.wikipedia.org/w/index.php?title=Alfredo_Antonini&diff=prev&oldid=877074645 This edit] put the ISBN template inside an external link, which is an error. [https://en.wikipedia.org/w/index.php?title=Chiura_Obata&diff=prev&oldid=877075114 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)
::: {{re|Jonesey95}} I fixed those errors. Pkbwcgs (talk) 19:57, 12 January 2019 (UTC)
:{{BotExtendedTrial|edits=25}} OK try again. — xaosflux Talk 04:10, 30 January 2019 (UTC)
:: 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)
:{{t|OperatorAssistanceNeeded|D}} any update on the trialing? — xaosflux Talk 18:49, 12 March 2019 (UTC)
:: {{re|Xaosflux}} I will go forward with the trial this week. Pkbwcgs (talk) 19:06, 12 March 2019 (UTC)
:::{{ping|Pkbwcgs}} Did you mean to disable the template? --DannyS712 (talk) 09:36, 22 March 2019 (UTC)
:::: {{re|DannyS712}} I will disable the template once I have done the trial. Pkbwcgs (talk) 19:18, 22 March 2019 (UTC)
:::::{{u|Pkbwcgs}}, we're at two months now - is this going anywhere? Primefac (talk) 20:49, 24 May 2019 (UTC)
:::::{{t|OperatorAssistanceNeeded|D}} Primefac (talk) 16:39, 9 June 2019 (UTC)
{{BotExpired}} Primefac (talk) 12:12, 15 June 2019 (UTC)
: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.