Operator: Hazard-SJ (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 01:33, Tuesday May 28, 2013 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: GitHub
Function overview: Fixing citation style
Links to relevant discussions (where appropriate): bot request
Edit period(s): Periodic
Estimated number of pages affected: thousands
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: Currently, it only fixes Help:CS1_errors#Wikilink_embedded_in_URL_title, but I might implement more fixes as well (would separate approval be required in that case, since it's still fixing CS1 errors?). Hazard-SJ ✈ 01:33, 28 May 2013 (UTC)
Discussion
self.removeWikilinks()
...simply beautiful, my friend. Pywikipedia strikes again! :) On a related note, task 13 on my bot also deals with a CS1 error. Theopolisme (talk) 01:41, 28 May 2013 (UTC)- Yes, thanks :) Also, I believe I remember seeing that task, and I'm currently considering implementation of Help:CS1_errors#.7Carchiveurl.3D_requires_.7Carchivedate.3D. In such a case, It might be also useful to add your task to it as well ;) Hazard-SJ ✈ 02:44, 28 May 2013 (UTC)
- Questions
- Thanks! GoingBatty (talk) 01:58, 28 May 2013 (UTC)
- Answers:
- With that version of the code, only those starting with either "cite" or "web". I've just added support for {{citation}} as well in this change, though I plan on coming up with a better and more specific list soon.
- As of this change, it should remove templates as well. Hazard-SJ ✈ 02:44, 28 May 2013 (UTC)
- You're welcome, and thanks for the code review ;) Hazard-SJ ✈ 02:44, 28 May 2013 (UTC)
- Answers:
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·Add§hore· Talk To Me! 08:33, 28 May 2013 (UTC)
- Trial complete. with 52 edits. Also, would I need separate approvals per what I mentioned above? Hazard-SJ ✈ 00:29, 29 May 2013 (UTC)
- I don't know if it requires separate approvals or not, but if it is all the same type of errors, couldn't you just trial an assortment of errors, BAG folk? -68.107.136.227 (talk) 03:13, 29 May 2013 (UTC)
- Trial complete. with 52 edits. Also, would I need separate approvals per what I mentioned above? Hazard-SJ ✈ 00:29, 29 May 2013 (UTC)
- Seems useful, catches an error, although the explanation template is too much to read. -68.107.136.227 (talk) 22:43, 28 May 2013 (UTC)
These are surely not a good idea: [1] [2] [3]
This is also not ideal [4], a better outcome would be to shift the subscription flag to the citation's via parameter, e.g.: "SAUDI ARABIA,UNITED STATES : Saudi's Al Jouf University Chooses Cisco WebEx, Offered in the Kingdom in Partnership With STC, for E-Learning". Mena Report. 12 May 2011. Retrieved 23 August 2012 – via HighBeam Research.
Dragons flight (talk) 03:51, 29 May 2013 (UTC)
- This commit fixes the subscription issue (and potentially others?). I'm still considering about the {{lang}} issues. Should I just remove the template, but leave the value of
|2=
which is the text itself, or put the entire citation template in the {{lang}} template (I think this is unwise)? Otherwise I'd probably have to either just skip those errors, or set|2=
to a null value before the citation template, leaving the actual value in the citation template. What do you suggest? Hazard-SJ ✈ 07:02, 1 June 2013 (UTC)- I suggest converting {{lang}} to
|language=
and leaving the value of|2=
in the|title=
parameter (e.g. this edit), and then deleting any duplicated|language=
parameter. GoingBatty (talk) 15:16, 1 June 2013 (UTC) - I have an uncommitted fix for it, but I'm trying to work out this issue (see bug 2700). Hazard-SJ ✈ 01:24, 2 June 2013 (UTC)
- Fixed in this commit. Hazard-SJ ✈ 02:52, 2 June 2013 (UTC)
- Is this ready for another trial? please {{ping}} me with your response :) ·addshore· talk to me! 09:12, 2 June 2013 (UTC)
- @Addshore: No, I'm not yet ready, I'd like to improve the code and add a few more features first. I'll keep you updated. Hazard-SJ ✈ 22:59, 3 June 2013 (UTC)
- @Addshore: (diff) I added some more features and did some code clean-up, so I think I'm ready again. As a side note, these edits were accidentally made, though with an outdated version of the code. Hazard-SJ ✈ 02:36, 7 June 2013 (UTC)
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·addshore· talk to me! 08:17, 7 June 2013 (UTC)
- Is this ready for another trial? please {{ping}} me with your response :) ·addshore· talk to me! 09:12, 2 June 2013 (UTC)
- I suggest converting {{lang}} to
Trial complete. (edits) Hazard-SJ ✈ 04:20, 11 June 2013 (UTC)
- Edits such as this one and this one look a bit odd. GoingBatty (talk) 04:36, 11 June 2013 (UTC)
- [5] [6] [7] etc.
- (Don't see this task explicitly listed, but I see you mention it in the discussion, so posting here) I strongly suggest you limit the automatic edits to article space, to avoid edits like this. We generally treat all bots as article-only, unless otherwise stated. In this case, it is not uncommon to have wrong citation style as examples or problem tests, and the bot should not assume other namespaces require automatic correction. — HELLKNOWZ ▎TALK 07:37, 11 June 2013 (UTC)
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·addshore· talk to me! 18:46, 16 June 2013 (UTC)
- Hazard, I'm not a pywikipedia expert and don't pretend to be, but doesn't
page.namespace()
just return the namespace number? I bet I'm just missing something, but an explanation'd be great. Thanks! Theopolisme (talk) 04:35, 17 June 2013 (UTC)- You're correct about it returning the namespace number, but remember that
if 0
in Python returns False, and other digits return True, so in other words, if the namespace number is not zero, it continues to the next page. Hazard-SJ ✈ 05:54, 18 June 2013 (UTC)- *headdesk*, duh :p Theopolisme (talk) 14:18, 18 June 2013 (UTC)
- Trial complete. (edits); I haven't checked them all as yet (it somehow only did 49, though), but an obvious problem so far is the comments being copied from archiveurl the url where present. Hazard-SJ ✈ 17:14, 22 June 2013 (UTC)
- I only checked half the edits. Some of these edits may be garbage in, garbage out, but they look strange:
- In this edit and this edit, I wouldn't expect {{citation needed}} within
<ref>...</ref>
. - In [8] and this edit, the URLs were already in the
|deadurl=
parameter. - This edit moved {{!}} from the
|title=
parameter to the end of the reference. — Preceding unsigned comment added by GoingBatty (talk • contribs) 03:21, 23 June 2013 (UTC)
- I have raised similar concerns on your talk page and disabled the task for good measure. Graham87 14:13, 23 June 2013 (UTC)
- In this edit and this edit, I wouldn't expect {{citation needed}} within
- I only checked half the edits. Some of these edits may be garbage in, garbage out, but they look strange:
- Trial complete. (edits); I haven't checked them all as yet (it somehow only did 49, though), but an obvious problem so far is the comments being copied from archiveurl the url where present. Hazard-SJ ✈ 17:14, 22 June 2013 (UTC)
- *headdesk*, duh :p Theopolisme (talk) 14:18, 18 June 2013 (UTC)
- You're correct about it returning the namespace number, but remember that
- Hazard, I'm not a pywikipedia expert and don't pretend to be, but doesn't
The ongoing errors are a bit of a worry for me, especially as this bot is running in the article space. I'm leaning towards denying this task. --Chris 13:20, 24 June 2013 (UTC)
- I will leave out the part of the code that moves templates out of citation templates (maybe the language replacements are okay, since that's specifically hard-coded?). Also, I can code the bot to not make replacements in ref tags (as I did on a recently approved task). Also, I will have it check for
|deadurl=
as well. Hazard-SJ ✈ 02:41, 25 June 2013 (UTC)- {{BAGAssistanceNeeded}} In response too what I've said, may I have another trial please? Hazard-SJ ✈ 00:35, 3 July 2013 (UTC)
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·addshore· talk to me! 12:01, 21 July 2013 (UTC)
- Started, only did these so far, I'll try to finish when I get back online. Hazard-SJ ✈ 04:02, 24 August 2013 (UTC)
- In Template:Woman (Wolfmother song), the bot added
|archivedate=02 March 2012
- the leading zero is not needed. It would also be nice (but too much to ask for?) if the bot could have detected that the reference already had an archivedate and was just missing the pipe. GoingBatty (talk) 14:07, 24 August 2013 (UTC)- This change should strip the leading "0" if available. Also, as for the pipe issue, there might be (hopefully) few of such cases, and though I'm not sure if all such mistakes would all be in the same format, but if it's a frequent issue I could get a pattern to attempt it (running from false positives here). Hazard-SJ ✈ 02:45, 25 August 2013 (UTC)
- I thought this task was about removing links and templates from citation templates, but these edits are fixing archive link errors...:Jay8g [V•T•E] 18:07, 25 August 2013 (UTC)
- This task focuses on errors related to citation templates, which include the archive links. As for the templates, it's better to have that part more specific (hard-code for certain templates only, because, as seen from the above, can cause many problems). IIRC, there isn't a problem with links. However, thanks for the mention, it caused me to look back at the code and notice that I disabled the entire link/template section rather than just that part that isn't specific as it pertains to templates (which, as I said, can be very troublesome). That has now been fixed in the code. Hazard-SJ ✈ 05:15, 28 August 2013 (UTC)
- I thought this task was about removing links and templates from citation templates, but these edits are fixing archive link errors...:Jay8g [V•T•E] 18:07, 25 August 2013 (UTC)
- This change should strip the leading "0" if available. Also, as for the pipe issue, there might be (hopefully) few of such cases, and though I'm not sure if all such mistakes would all be in the same format, but if it's a frequent issue I could get a pattern to attempt it (running from false positives here). Hazard-SJ ✈ 02:45, 25 August 2013 (UTC)
- In Template:Woman (Wolfmother song), the bot added
- Started, only did these so far, I'll try to finish when I get back online. Hazard-SJ ✈ 04:02, 24 August 2013 (UTC)
I'll also be adding this, and as I mentioned before, possibly others in the future. Hazard-SJ ✈ 06:07, 28 August 2013 (UTC)
- OK, here it is. Hazard-SJ ✈ 06:25, 28 August 2013 (UTC)