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 Withdrawn by operator.

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:

  1. The bot extracts passthrough parameters from ((cite pmid)) and ((cite doi)) templates (and also default parameters if the corresponding passthrough parameters are missing) and adds them to the substituted template. (see example diff.)
  2. If a citation contains a doi without a pmid, the bot will query the PubMed database with the doi to obtain a pmid. If the pmid is returned by the search, the bot will add it to the citation.

Discussion[edit]

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 ))
Barker LF, Shulman NR, Murray R, Hirschman RJ, Ratner F, Diefenbach WC, Geller HM (1996). "Transmission of serum hepatitis. 1970". Journal of the American Medical Association. 276 (10): 841–844. doi:10.1001/jama.276.10.841. PMID 8769597. ((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))
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 (2012). "Sodium taurocholate cotransporting polypeptide is a functional receptor for human hepatitis B and D virus". eLife. 1: e00049. doi:10.7554/eLife.00049. PMC 3485615. PMID 23150796. ((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]

Those displayauthor parameters were added by various editors to the cite doi templates (see diff and diff). I agree that it is probably not a good idea to propagate the displayauthor parameter, particularly if the parameter is set to a low number. Hence I have modified the bot script not to include that parameter in the substituted template unless displayauthors was set as a passthrough parameter in that specific article. Boghog (talk) 04:38, 10 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. --slakrtalk / 07:23, 12 April 2014 (UTC)[reply]

This edit looks buggy. No harm was done, but the edit summary is incorrect and I can't explain the logic. It was reported on User talk:Boghog but should have been reported here. – Jonesey95 (talk) 03:54, 13 April 2014 (UTC)[reply]
I have responded on my talk page and modified the bot script accordingly. I just wanted to note here that particular edit was an accidental rerun of the bot. Boghog (talk) 09:40, 13 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]

There was also consensus to change from vertical to horizontal format. Boghog (talk) 05:23, 26 May 2014 (UTC)[reply]
Please respond to Jc3s5h's request... We need to not leave dangling BRFAs. Hasteur (talk) 00:10, 26 May 2014 (UTC)[reply]
Here was the discussion with the consensus [1] Doc James (talk · contribs · email) (if I write on your page reply on mine) 05:23, 26 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]

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.