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 Approved.
Operator: Basilicofresco (talk · contribs)
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.
- It will start from a offline generated list of selected articles with these characteristics:
- round brakets in the article name, eg. Alcobaça (Portugal);
- "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);
- 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)).
- checks Commons for a matching gallery or category with:
- same name (eg. "Alcobaça (Portugal)" --> does Commons:Alcobaça (Portugal) exist?)
- same name adding "category" (eg. Alcobaça (Portugal) --> does Commons:Category:Alcobaça (Portugal) exist?)
- same name after removing brakets (eg. Lynx (web browser) --> does Commons:Lynx web browser exist?)
- same name after removing brakets and adding category (eg. Lynx (web browser) --> does Commons:Category:Lynx web browser exist?)
- same name after replacing brakets with a comma (eg. Haren (Groningen) --> does Commons:Haren, Groningen exist?)
- same name after replacing brakets with a comma and adding category (eg. Haren (Groningen) --> does Commons:Category:Haren, Groningen exist?)
- if a redirect is found on Commons, then it takes the redirect destination
- adds the right template in the right place (eg.
{{commons|Alcobaça (Portugal)}}
or{{commons cat|Alcobaça (Portugal)}}
at the top of the External links section)
Discussion
edit{{BAGAssistanceNeeded}} Within 10 days I did not see any question. Can I start a test run? -- Basilicofresco (msg) 13:20, 15 July 2010 (UTC)[reply]
- 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)[reply]
- 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. Tim1357 talk 23:17, 15 July 2010 (UTC)[reply]
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)[reply]
- 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)[reply]
{{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)[reply]
- 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. Tim1357 talk 00:49, 19 August 2010 (UTC)[reply]
- Ok, done! -- Basilicofresco (msg) 11:11, 20 August 2010 (UTC)[reply]
- Could you link the discussions? –xenotalk 14:51, 3 September 2010 (UTC)[reply]
- Sure: Wikipedia talk:WikiProject Images and Media/Commons#FrescoBot 6, Template talk:Commons#FrescoBot 6, Template talk:Commons category#FrescoBot 6. 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)[reply]
- Could you link the discussions? –xenotalk 14:51, 3 September 2010 (UTC)[reply]
- Ok, done! -- Basilicofresco (msg) 11:11, 20 August 2010 (UTC)[reply]
- It seems no one cares ... Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Mr.Z-man 19:00, 2 October 2010 (UTC)[reply]
Trial complete. 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)[reply]
I have no hurry, however after 4 months... ;) {{BAGAssistanceNeeded}} -- Basilicofresco (msg) 21:10, 19 October 2010 (UTC)[reply]
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)[reply]
- 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 Commons:Asparagus (from Commons: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)[reply]
First of all, thank you for your attention.
- 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.
Basilicofresco (msg) 20:23, 11 November 2010 (UTC)[reply]
- 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)[reply]
Refined proposal
editThe "Categories vs. galleries" issue can be resolved using {{Commons and category}} (I almost forgot about it). So, here is the proposal:
- 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.
If this proposal sounds reasonable, please write below: "uhm... sounds reasonable" and sign. ;) Thanks. -- Basilicofresco (msg) 08:45, 21 November 2010 (UTC)[reply]
- 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)[reply]
Approved. WP:SILENCE seems to apply to the discussions regarding {{Sister project links}} vs {{Commons cat}}. Anomie⚔ 02:38, 1 December 2010 (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.