Operator: Madman
Automatic or Manually assisted: Automatic.
Programming language(s): PHP.
Source code available: Yes.
Function overview: Removing redundant url parameter from citation templates with a pmid parameter
Edit period(s): One-time run.
Estimated number of pages affected: 1000-2000.
Exclusion compliant (Y/N): Yes.
Already has a bot flag (Y/N): Yes.
Function details: The bot first finds all articles with external links to http://www.ncbi.nlm.nih.gov/pubmed/. For each article, it then skips those that link to PubMed and not to a PubMed abstract. It then finds all templates used in the article. For each template, it finds all transclusions used in the text. If the transclusion includes a PMID parameter that has a valid PMID and a URL parameter that links to the PubMed abstract with the same PMID, it removes the URL parameter from the transclusion. It skips links to PubMed abstracts that include a query or fragment, as these are rare edge cases that make it difficult to remove the URL parameter. I've skimmed over a thousand diffs; the bot does exactly what the pmid=|original requestor wanted. — madman bum and angel 17:05, 25 July 2009 (UTC)[reply]
Does this also find URLs like http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15789284 ? —Chris Capoccia T⁄C 09:08, 29 July 2009 (UTC)[reply]
It appears to be a useful bot-task as pmid's are unique identifiers, whereas URLs are not necessarily stable. I don't see a lot of community discussion. But the operator is designing the bot in response to a request that is particularly straight-forward. Is there a style manual guideline on using pmid #s? If there is, linking to it in support of this task might be useful. If there isn't there may be a larger community at the style guidelines that may want the bot to do more than this. Still, it looks like a straight-forward bot task. --68.127.233.138 (talk) 04:55, 1 August 2009 (UTC)[reply]