Wikipedia:Bots/Requests for approval/H3llBot 4
- 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 Approved.
Operator: H3llkn0wz (talk · contribs)
Automatic or Manually assisted: Automatic
Programming language(s): WikiSharpAPI (C#)
Source code available: Not now, I will make API available when it's actually usable.
Function overview: Reference and citation maintenance
Links to relevant discussions (where appropriate): Wikipedia:Bot_requests/Archive_35#Correct_archive_parameters_if_url_is_archive.org, User_talk:H3llBot#accessdate.
Edit period(s): Continuous (when I'm online)
Estimated number of pages affected: All encountered pages with issues, limited by main archival task speed (5-8epm), I suspect this task will raise this to 6-9epm.
Exclusion compliant (Y/N): Y
Already has a bot flag (Y/N): Y
Function details:
1) If a citation's |url=
is a valid Wayback archive link, set |archiveurl=
and |archivedate=
to match it and trim the |url=
to the original link, if
- no
|archiveurl=
is set -and- - no
|archivedate=
is set -or-|archivedate=
is of broken syntax/unrecognised -or-|archivedate=
is the same as actual link's archive date
2) Remove {{Wayback}} template and add corresponding |archiveurl=
and |archivedate=
in the preceding citation if
- {{Wayback}} has
|url=
set and|date=
set, and|title=
not set or equal to citation's|title=
-and- - citation has no
|archiveurl=
set and no|archivedate=
set, and with|url=
matching {{Wayback}}'s url
- See example for both fixes.
X) As an addition, I want to improve the previous task's (BRFA, description) functionality a bit:
When adding |archivedate=
to a citation
- If one of {{Use dmy dates}}, {{Use mdy dates}}, or {{Use ymd dates}} templates is present, use that respective date format for the field
- Otherwise use citation's
|accessdate=
(or|date=
if former is missing/invalid) date format - Otherwise use yyyy-mm-dd (e.g. 2010-12-31) date format
Discussion
[edit]I hope you mean yyyy-mm-dd! Rich Farmbrough, 21:04, 30 September 2010 (UTC).[reply]
- Oh - and that's a great improvement to a great task. Rich Farmbrough, 21:05, 30 September 2010 (UTC).[reply]
- Yes, yyyy-mm-dd, my bad; the code uses Ymd, so all's well! Also, thanks. — HELLKNOWZ ▎TALK 21:59, 30 September 2010 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MBisanz talk 22:46, 19 October 2010 (UTC)[reply]
- Trial complete. Done. edits here. — HELLKNOWZ ▎TALK 19:41, 7 November 2010 (UTC)[reply]
- I see a number of cases where the bot created dates like "28-09-2007": [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15]
- I also see a few cases where you copied the format of
|date=
when|accessdate=
did exist and had a valid format, for example the second 2 in [16]. Anomie⚔ 01:02, 19 November 2010 (UTC)[reply]- {{OperatorAssistanceNeeded}} Any reply? Anomie⚔ 03:20, 24 November 2010 (UTC)[reply]
- Yes, thanks for reply. I got so paranoid about not accidentally adding dmy after Rich's comment that I went and ended up doing exactly that... Regarding
|date=
before|accessdate=
, I checked them in reverse order. I also did not first check if the date is valid, so the bad date params caused the bot to default to dmy, which in turn was ymd. Should be OK in recognising formats now [17]. ymd format: one edit was fixed, one fixed manually, bot-fixed rest: [18][19][20][21][22][23][24][25][26][27][28][29][30]. accessdate priority: Bot-fixed: [31][32][33][34][35]. Hopefully I didn't miss anything. Sorry for the mess, I was definitely far over Ballmer's peak at the time. — HELLKNOWZ ▎TALK 11:53, 24 November 2010 (UTC)[reply]- Is [36] correct? It seems to have chosen 13 May 2008 even though the accessdate is 2010-11-07. Also, I see in your sandbox edit that the bot output dates as "28/09/2007", "2007/09/28", and "28-09-2007". The bot should never output any of those formats, even if some misguided human did use them. The bot should always output either "September 28, 2007", "28 September 2007", or "2007-09-28". Anomie⚔ 16:09, 24 November 2010 (UTC)[reply]
- The Iran article has a {{Use dmy dates}} template, so that instance should be correct. Regarding digit separator, the bot attempted to mimic the original date format's separator ("/", "\", "."). I will disable this. Similarly, I will then only allow the "M d, y", "d M y" and "y-m-d" formats. I don't have the irc logs any more, but I ran a date format check in summer and "28-09-2007" appeared roughly as often as "September 28, 2007" did. This is why I was allowing this format as well. There are featured articles using dmy only. But I suppose "Do not use year-final numerical date formats.." surpasses "Dates in article references should all have the same format." Will post a sandbox edit in the evening. — HELLKNOWZ ▎TALK 16:34, 24 November 2010 (UTC)[reply]
- sandbox edit. Ignoring separators and not using dmy. — HELLKNOWZ ▎TALK 09:16, 25 November 2010 (UTC)[reply]
- Ah, ok on the Iran page. Sandbox edit looks good now. Approved. Anomie⚔ 16:08, 25 November 2010 (UTC)[reply]
- Is [36] correct? It seems to have chosen 13 May 2008 even though the accessdate is 2010-11-07. Also, I see in your sandbox edit that the bot output dates as "28/09/2007", "2007/09/28", and "28-09-2007". The bot should never output any of those formats, even if some misguided human did use them. The bot should always output either "September 28, 2007", "28 September 2007", or "2007-09-28". Anomie⚔ 16:09, 24 November 2010 (UTC)[reply]
- Yes, thanks for reply. I got so paranoid about not accidentally adding dmy after Rich's comment that I went and ended up doing exactly that... Regarding
- {{OperatorAssistanceNeeded}} Any reply? Anomie⚔ 03:20, 24 November 2010 (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.