Wikipedia:Bots/Requests for approval/Erwin85Bot 3
- 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.
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.
Discussion
[edit]Approvals
Test edits. --Erwin85 (talk) 16:21, 28 February 2008 (UTC)[reply]
- 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)[reply]
- 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;
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. --uǝʌǝsʎʇɹnoɟʇs(st47) 12:32, 8 March 2008 (UTC)[reply]
- There were 19 images that didn't belong in the category. Those pages were edited. The idea is to run this bot as a cron job. --Erwin85 (talk) 14:43, 10 March 2008 (UTC)[reply]
- I edited a few more pages and will wait for a response now. --Erwin85 (talk) 10:19, 12 March 2008 (UTC)[reply]
- There were 19 images that didn't belong in the category. Those pages were edited. The idea is to run this bot as a cron job. --Erwin85 (talk) 14:43, 10 March 2008 (UTC)[reply]
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. --uǝʌǝsʎʇɹnoɟʇs(st47) 12:32, 8 March 2008 (UTC)[reply]
- How's the trial come along? SQLQuery me! 06:50, 20 March 2008 (UTC)[reply]
- 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)[reply]
Trial, SQL query look ok. Approved. — Werdna talk 07:34, 21 March 2008 (UTC)[reply]
- 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.