Wikipedia:Bots/Requests for approval/Erwin85Bot 3
From Wikipedia, the free encyclopedia
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
[edit] Erwin85Bot
tasks • contribs • count • sul • logs • page moves • block user • block log • flag log • flag bot
Automatic or Manually Assisted:Automatic, from toolserver
Programming Language(s):Python (pywikipedia)
Function Summary:Get a list of files in Category:All_orphaned_fairuse_images that aren't orphans. Remove Template:Di-orphaned fair use from those pages.
Edit period(s) (e.g. Continuous, daily, one time run):Daily
Edit rate requested: Not really an issue, for test edits I used standard pywikipedia throttle, but I could use a larger throttle.
Already has a bot flag (Y/N):Y
Function Details:Perform a query on the toolserver's database to get a list of files in Category:All_orphaned_fairuse_images that aren't orphans and remove Template:Di-orphaned fair use from those pages.
[edit] Discussion
Approvals
Test edits. --Erwin85 (talk) 16:21, 28 February 2008 (UTC)
- What is the definition of "not an orphan"? Would this pass simple inline links, or would it pass uses or links outside article space? Gimmetrow 04:36, 29 February 2008 (UTC)
- Not being an orphan means that the image is used (imagelinks) in an article, i.e. a page in namespace 0. The query I use is
SELECT img.page_id, CONCAT('Image:', img.page_title) as title FROM enwiki_p.page AS img LEFT JOIN enwiki_p.categorylinks ON img.page_id = cl_from LEFT JOIN enwiki_p.imagelinks ON img.page_title = il_to LEFT JOIN enwiki_p.page AS p ON il_from = p.page_id WHERE img.page_namespace = 6 AND p.page_namespace = 0 AND cl_to = 'All_orphaned_fairuse_images' AND il_from IS NOT NULL GROUP BY page_id;
- How's the trial come along? SQLQuery me! 06:50, 20 March 2008 (UTC)
- Check out Erwin85Bot's contributions. It does what it should do, so I'm waiting for it to be either approved or denied or do you want me to make some more trial edits? --Erwin85 (talk) 08:54, 20 March 2008 (UTC)
Trial, SQL query look ok. Approved. — Werdna talk 07:34, 21 March 2008 (UTC)
- The above discussion is preserved as an archive. Please do not modify it. Subsequent comments should be made on the appropriate discussion page, such as the current discussion page. No further edits should be made to this discussion.