Wikipedia:Bots/Requests for approval/FrescoBot 6


 * 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 Symbol keep vote.svg Approved.

FrescoBot 6
Operator:

Automatic or Manually assisted: auto (after a period of testing)

Programming language(s): python

Source code available: not yet (pywikipedia + custom script)

Function overview: analizes selected articles, checks a matching target on Commons and then add commons or commons cat.

Links to relevant discussions (where appropriate):

Edit period(s): few times per year or less

Estimated number of pages affected: few thousands?

Exclusion compliant (Y/N): Y

Already has a bot flag (Y/N): Y

Function details: this task aims to add to the article the link to Commons when unambiguous related media content is found.
 * 1) It will start from a offline generated list of selected articles with these characteristics:
 * 2) * round brakets in the article name, eg. Alcobaça (Portugal);
 * 3) * "External links" section (I plan to improve in the future the ability of the script to place the template in the right place even without "External links" section);
 * 4) * article without any Commons template (exclusion regex: ([Cc]ommons|[Pp]ic|[Cc]ommonspar|[Cc]ommonspiped|[Cc]ommonsme|[Ss]isterlinkswp|[Ww]ikicommons|[Cc]ommonstiny|[Cc]ommons-gallery|[Gg]allery-link|[Cc]ommonsimages|[Ww]ikimedia[ _]Commons|[Cc]ommons-inline|[Ww]ikicommons-inline|[Cc]ommons[ _]category|[Cc]ommons[ _]cat|[Cc]ommonscat-inline|[Cc]ommons[ _]cat[ _]left|[Cc]ommons2|[Cc]ommonsCat|[Cc]ommoncat|[Cc]ms-catlist-up|[Cc]atlst[ _]commons|[Cc]ommonscategory|[Cc]ommonscat|[Cc]ommonsimages[ _]cat|[Cc]ommons[ _]cat4|[Cc]ommonscat[ _]left|[Cc]ommons[ _]and[ _]category|[Cc]ommons[ _]and[ _]cat) ).
 * 5) checks Commons for a matching gallery or category with:
 * 6) *same name (eg. "Alcobaça (Portugal)" --> does Commons:Alcobaça (Portugal) exist?)
 * 7) *same name adding "category" (eg. Alcobaça (Portugal) --> does Commons:Category:Alcobaça (Portugal) exist?)
 * 8) *same name after removing brakets (eg. Lynx (web browser) --> does Commons:Lynx web browser exist?)
 * 9) *same name after removing brakets and adding category (eg. Lynx (web browser) --> does Commons:Category:Lynx web browser exist?)
 * 10) *same name after replacing brakets with a comma (eg. Haren (Groningen) --> does Commons:Haren, Groningen exist?)
 * 11) *same name after replacing brakets with a comma and adding category (eg. Haren (Groningen) --> does Commons:Category:Haren, Groningen exist?)
 * 12) *if a redirect is found on Commons, then it takes the redirect destination
 * 13) adds the right template in the right place (eg. or  at the top of the External links section)

Discussion
BAGAssistanceNeeded Within 10 days I did not see any question. Can I start a test run? -- Basilicofresco  (msg) 13:20, 15 July 2010 (UTC)
 * Seems straightforward. It might be more straightforward to check for the presence of commons templates using the API's prop=templates than a regex, as then you don't have to worry about capitalization, space versus underscore, new redirects, and the like. Anomie⚔ 16:15, 15 July 2010 (UTC)
 * Seems like most of this (except for the external links section bit) can be done with a toolserver database query. Im not sure if you have a toolserver account, but you may always ask at WP:DBR for some help. DB queries are much faster and in my oppinion, easier, than using the mediawiki API. Tim  1357  talk  23:17, 15 July 2010 (UTC)
 * Perhaps this would work? Im away from my computer now so I cant test it. Tim  1357  talk  23:40, 15 July 2010 (UTC)

Thank you for your suggestions. Well, the query would create the list much faster... but I'm (still) not used to sql and in order to avoid mistakes I would prefer to keep strict control on every step of the task. I'm going to start from a dump generated list of pre-selected articles (step 1) and this will greatly speed up the whole process. -- Basilicofresco  (msg) 07:54, 18 July 2010 (UTC)
 * I'm leaving tomorrow for a trip, so I will not able to run any script until second half of August. See you! -- Basilicofresco  (msg) 07:58, 21 July 2010 (UTC)

BAGAssistanceNeeded I'm back. I will run the script on my home computer so the efficiency of the list-creator script is not critical and most of all does not affect Wikimedia servers. -- Basilicofresco  (msg) 14:30, 18 August 2010 (UTC)


 * It all looks Basilicofresco, but I'd like to see some community discussion about a bot adding these templates. Spam a few talk pages explaining what you hope to do. Tim  1357  talk  00:49, 19 August 2010 (UTC)
 * Ok, done! -- Basilicofresco  (msg) 11:11, 20 August 2010 (UTC)
 * Could you link the discussions? – xeno talk 14:51, 3 September 2010 (UTC)
 * Sure: Wikipedia talk:WikiProject Images and Media/Commons, Template talk:Commons, Template talk:Commons category. No replies. If you feel I missed the appropriate talk page, feel free to start there the discussion. -- Basilicofresco  (msg) 10:11, 6 September 2010 (UTC)
 * Note posted @ VPR (Village pump (proposals)). – xeno talk 13:25, 20 September 2010 (UTC)
 * It seems no one cares ... Mr.Z-man 19:00, 2 October 2010 (UTC)

This morning I wrote and tested the script. Fixed 1st and 2nd edit due a stupid typo. No problems on subsequent edits. As you can see, if a redirect is found on Commons, the bot follows it and then analyze the target. -- Basilicofresco  (msg) 10:42, 10 October 2010 (UTC)

I have no hurry, however after 4 months... ;) BAGAssistanceNeeded -- Basilicofresco  (msg) 21:10, 19 October 2010 (UTC)

November has arrived and I had not one single complaint about this task. If you are still doubtful, the best thing to do is to approve a 500 edits trial and wait for any reaction. -- Basilicofresco  (msg) 23:11, 1 November 2010 (UTC)
 * For the record, the edits are here. I noticed 14 cases where your bot linked to a category when a page or redirect to a page exists on Commons, for example this edit linked to Commons:Category:Asparagus rather than Asparagus (from Asparagus (genus)). In fact, in that particular example how did it find Commons:Category:Asparagus at all?
 * I also see the edit to Georgia (U.S. state) was removed without explanation, although probably because the article had Sister project links. It may be worth checking for that template too. Anomie⚔ 23:18, 10 November 2010 (UTC)

First of all, thank you for your attention. Basilicofresco (msg) 20:23, 11 November 2010 (UTC)
 * Categories vs. galleries: well, IMHO the link to the category is almost always a better choice over the gallery page. Gallery pages are usually poor mantained, there are just few images and the gallery itself rarely add any real value. Categories are easier to mantain and to scale up (adding sub-categories). Moreover well written and well mantained gallery pages are usually already linked from en.wiki... so I suggest to prefer categories over galleries (if both available).
 * Commons vs. Sister project links: you are right, probably Tpbradbury removed the link to Commons due the Sister project links. However should be noted that Sister project links simply "provides links to the 'Search' page on the various Wikimedia sister projects". That means that it does not grant that any related content actually exist, it is just a (blind) guess. Commons and Commons cat instead state that Wikimedia Commons actually has media related to the subject and provide a link to it. This is a precious information.
 * I only asked about the gallery versus category because your function details list checking for galleries first. As for the other, that sounds like a discussion that should be started somewhere else. Anomie⚔ 03:14, 12 November 2010 (UTC)
 * I started Template talk:Commons category. -- Basilicofresco  (msg) 00:15, 16 November 2010 (UTC)

Refined proposal
The "Categories vs. galleries" issue can be resolved using Commons and category (I almost forgot about it). So, here is the proposal: If this proposal sounds reasonable, please write below: "uhm... sounds reasonable" and sign. ;) Thanks. -- Basilicofresco  (msg) 08:45, 21 November 2010 (UTC)
 * If a related category or page can be found on Commons (see Function details above), the bot adds the right template at the top of the External links section.
 * If on Commons exist both category and page (gallery), then Commons and category should always be preferred over Commons because gallery pages are usually poor mantained, there are just few images and the gallery itself rarely add any real value. Categories are easier to mantain and to scale up (adding sub-categories). Moreover well written and well mantained gallery pages are usually already linked from en.wiki.
 * The presence of Sister project links should not affect the insertion of Commons cat or Commons because should be noted that Sister project links simply "provides links to the 'Search' page on the various Wikimedia sister projects". That means that it does not grant that any related content actually exist, it is just a (blind) guess. Commons and Commons cat instead state that Wikimedia Commons actually has media related to the subject and provide a link to it. This is a precious information. It is the difference between the search function and a link.
 * Works for me. BTW, you may want to drop a note on Template talk:Sister project links since your post at Template talk:Commons category doesn't seem to be drawing any response. Anomie⚔ 15:08, 21 November 2010 (UTC)

WP:SILENCE seems to apply to the discussions regarding Sister project links vs Commons cat. Anomie⚔ 02:38, 1 December 2010 (UTC)
 * 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.