Operator: Boghog (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 22:10, Saturday April 5, 2014 (UTC)
Automatic, Supervised, or Manual: Supervised
Programming language(s): Python
Source code available: User:BogBot/Source_code/Task_05
Function overview: For the 1500 most accessed WP:MED articles, replace transcluded ((cite pmid)), ((cite doi)), and ((cite isbn)) templates with in-line ((cite journal)) and ((cite book)) templates respectively. In addition, replace vertically formatted templates (template on many lines) with horizontally formatted templates (template on one line).
Links to relevant discussions (where appropriate): Wikipedia_talk:WikiProject_Medicine/Archive_47#Replace_.22cite_pmid.22_with_.22cite_journal.22 "cite pmid" with "cite journal"
Edit period(s): A one time run for now. May be run periodically in the future for maintenance.
Estimated number of pages affected: maximum 1500
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: In order to respect WP:CITEVAR, the bot will substitute transcluded cite templates with in-line templates only if in-line templates predominate in the current version of the article. The bot will also keep track of which articles were not substituted for possible human follow-up (i.e., only substitute if there is consensus on the article's talk page for these edits). Likewise, the bot will replace vertical cite templates with horizontal templates only if horizontal templates templates predominate. In addition, the bot will determine the predominate author format ("author" vs "authors" vs "first1, last1, first2, last2") and the substituted template will follow that style.
A example bot edit is shown here.
Additional notes:
From your example:
Seven authors in |author=
, why |display-authors=1
in this citation?
((cite journal | author = Barker LF, Shulman NR, Murray R, Hirschman RJ, Ratner F, Diefenbach WC, Geller HM | title = Transmission of serum hepatitis. 1970 | journal = Journal of the American Medical Association | volume = 276 | issue = 10 | pages = 841–844 | year = 1996 | pmid = 8769597 | doi = 10.1001/jama.276.10.841 | display-authors = 1 ))
((cite journal))
: Invalid |display-authors=1
(help)CS1 maint: multiple names: authors list (link)Twenty authors in |author=
, why |display-authors=8
in this citation?
((cite journal | author = Yan H, Zhong G, Xu G, He W, Jing Z, Gao Z, Huang Y, Qi Y, Peng B, Wang H, Fu L, Song M, Chen P, Gao W, Ren B, Sun Y, Cai T, Feng X, Sui J, Li W | title = Sodium taurocholate cotransporting polypeptide is a functional receptor for human hepatitis B and D virus | journal = eLife | volume = 1 | pages = e00049 | year = 2012 | pmid = 23150796 | pmc = 3485615 | doi = 10.7554/eLife.00049 | display-authors = 8 | doi-access = free))
((cite journal))
: Invalid |display-authors=8
(help)CS1 maint: multiple names: authors list (link)—Trappist the monk (talk) 20:35, 9 April 2014 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. --slakr\ talk / 07:23, 12 April 2014 (UTC)[reply]
This is wonderful. I am so looking forwards to no longer having to correct all this refs by hand :-) What a huge step forwards. Doc James (talk · contribs · email) (if I write on your page reply on mine) 19:39, 21 April 2014 (UTC)[reply]
Please clarify the point about converting templates with parameters arranged vertically to parameters arranged horizontally. Is this just for the template instances you need to modify for some other reason, or all cite xxx templates in the article? If the latter, prove the user community has expressed consensus for this change. Jc3s5h (talk) 14:27, 8 May 2014 (UTC)[reply]
Withdrawn by operator. – there were only about 300 pages that needed to be edited. Furthermore, there were a lot of special cases that were difficult to code for in the bot script. Hence I have completed editing the 300 pages manually checking each and every edit before committing. Boghog (talk) 16:14, 8 June 2014 (UTC)[reply]