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 {{ Ibid}} 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)
I havent tested the regex but it should work. Tim1357 ( talk) 17:56, 17 January 2010 (UTC) reply
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete.
@
harej
03:27, 23 January 2010 (UTC)
reply
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) reply
{{ OperatorAssistanceNeeded}} Any news? MBisanz talk 08:54, 20 February 2010 (UTC) reply