Wiki143:Bots/Requests for approval/DASHBot 8
Operator: Tim1357
Automatic or Manually assisted: Automatic
Programming language(s): Python (pywikipedia)
Source code available: I use basic.py, and some regex
Function overview: add Template:Tl to reference sections on articles that use <ref>Ibid.</ref>, <ref>op. cit.</ref> or <ref>loc. cit.</ref>
Links to relevant discussions (where appropriate): MOS: Wikipedia:Footnotes#Style_recommendations (first bullet)
Edit period(s): One time
Estimated number of pages affected: I dont know
Exclusion compliant (Y/N): Yes
Already has a bot flag (Y/N): Yes
Function details: Because I know of no way to use the API for this, I will do a dump scan for articles matching the regex:
re.search('/<\s?ref[^\>]*\s*((I|i)bid\.?|(O|o)p\.?\s?(c|C)it\.?|(L|l)oc\.?\s?(c|C)it\.?)
if that, then:
text = re.sub(\=\=(\n[^(\=\=)](<\s?(r|R)eferences|{{\s?(R|r)eflist)),==\n{{Ibid|date = {{subst:MONTHNAME}} {{subst:YEAR}}}}\\1,text,1,re.M)
Discussion
I havent tested the regex but it should work. Tim1357 (talk) 17:56, 17 January 2010 (UTC)
- I proposed Wikipedia_talk:AutoWikiBrowser/Feature_requests#Add_.7B.7BIbid.7D.7D_to_auto-tagger. -- Magioladitis (talk) 00:33, 21 January 2010 (UTC)
Template:BotTrial @harej 03:27, 23 January 2010 (UTC)
AWB implements this too: Wikipedia_talk:AutoWikiBrowser/Feature_requests/Archive_7#Add_.7B.7BIbid.7D.7D_to_auto-tagger. We are interested in any changes in the regex. -- Magioladitis (talk) 08:59, 11 February 2010 (UTC)
Template:Tl Any news? MBisanz talk 08:54, 20 February 2010 (UTC)
- My understanding is that Tim1357 is waiting for Toolserver access. Josh Parris 09:57, 20 February 2010 (UTC)
- Thats true. This job requires a dump scan, and to do that I need a toolserver account. I have already been approved, and I'm waiting for someone to create an account for me. Tim1357 (talk) 02:04, 21 February 2010 (UTC)
- I finally got around to generating the list of articles that list Ibid as a reference. Ill get around to testing sometime this/next week. Tim1357 (talk) 23:21, 27 February 2010 (UTC)
- Template:OperatorAssistanceNeeded Any updates? Are you almost ready to run this? — The Earwig (talk) 01:33, 20 March 2010 (UTC)
- I'll expire this in a day or so if you don't start the trial. — The Earwig (talk) 19:33, 28 March 2010 (UTC)
- File:Symbol abstain vote grey.svg Withdrawn by operator. Sorry, ill reopen later. Tim1357 (talk) 19:45, 28 March 2010 (UTC)
- I'll expire this in a day or so if you don't start the trial. — The Earwig (talk) 19:33, 28 March 2010 (UTC)
- Template:OperatorAssistanceNeeded Any updates? Are you almost ready to run this? — The Earwig (talk) 01:33, 20 March 2010 (UTC)
- I finally got around to generating the list of articles that list Ibid as a reference. Ill get around to testing sometime this/next week. Tim1357 (talk) 23:21, 27 February 2010 (UTC)
- Thats true. This job requires a dump scan, and to do that I need a toolserver account. I have already been approved, and I'm waiting for someone to create an account for me. Tim1357 (talk) 02:04, 21 February 2010 (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.