Commons:Bots/Requests/Botcrux

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Operator: Horcrux92 (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Essentially I will handle categorizations of files and categories (Botcrux is already flagged on it.wiki: it makes general fixes and fulfills the requests to the bots). In the specific:

  • Compile a list of files with redundant categories (file is categorized by a category, and a subcategory of that category) and remove the redundant category, leaving the specific subcategory that is most important (examples).
  • Intersect two lists of files generated from two respective intersectable categories, remove the two categories from each file and add a more specific category (examples).

Automatic or manually assisted: automatic (manually only if it's necessary to verify the edit before saving the page)

Edit type (e.g. Continuous, daily, one time run): when I find some work to do (e.g. to better populate categories or to sort files/categories into more specific categories)

Maximum edit rate (e.g. edits per minute): 1 edit / 5 sec

Bot flag requested: (Y/N): Y (I think I will need, to don't annoy the RC/WL)

Programming language(s): find & replace with regex, using AWB

Horcrux92 (talk) 18:10, 5 May 2016 (UTC)[reply]

Discussion

  • As noted by the hidden text in source, <!--List full details of the bot's tasks here--><!--Permission, if granted will be for the specified tasks only-->. Please expand/correct your bot task description to include a specific task, not open approval for "categorization". As well, I also can't tell if you're just describing the bot's task on another project, or also requesting approval for the same here. :) ~riley (talk) 18:43, 5 May 2016 (UTC)[reply]
    For example, I'd like to automatize edit like this and run the bot over all the Category:Companies by country. Would the flag last only for this specific task? Shoud I do other requests for each work I will have to do? --Horcrux92 (talk) 19:02, 5 May 2016 (UTC)[reply]
    Thank you, that is a good example. As shown in our archives, each specific task goes through the COM:BRFA process. Established bot's can request open approval of general tasks (i.e. COM:Regex fixes) if they've demonstrated the need in a bot request. As requested, please update the description to reflect the task.(i.e. Using list comparer with AWB, compile a list of files with redundant categories (file is categorized by a category, and a subcategory of that category) and remove the redundant category, leaving the specific subcategory that is most important. Example diff) if that is the case. ~riley (talk) 19:20, 5 May 2016 (UTC)[reply]
    Thank you. I hope this is sufficient :) --Horcrux92 (talk) 00:17, 6 May 2016 (UTC)[reply]
  • Comments on trial: Please modify the edit summary to include "Bot:" and disable section headers (unnecessary because you're handling categories). As well, in the case of this edit, please remove duplicate categories using regex while at it. All edits marked as patrolled. :) ~riley (talk) 02:18, 6 May 2016 (UTC)[reply]
    Yes, on it.wiki I use to always prepend "Bot:" when I work under the bot flag (see). Sorry but I did not get the meaning of "remove duplicate categories using regex while at it". --Horcrux92 (talk) 10:03, 6 May 2016 (UTC)[reply]
  • Let's focus on how your bot is going to perform here, not on itwiki. I'll take that as a yes, you'll add "Bot:" to the edit summary. As shown in this diff, you'll note that the source currently includes: [[Category:Logos of companies of Austria‎]]
    [[Category:Logos of companies of Austria]]
    Please add regex to remove duplicate categories in addition to the changes already being performed. Otherwise, looks good! ~riley (talk) 18:23, 6 May 2016 (UTC)[reply]
    It was only to say that I already use to prepend "Bot:" in the edit summary, it's not new for me and I won't forget for sure ;-)
    With respect to the duplicate categories: yes, I will keep it in mind. Even if in that specific case the error was in the previous edit, cause I thought (or even I thought to have seen) that Cat-a-lot removed automatically duplicates. --Horcrux92 (talk) 19:03, 6 May 2016 (UTC)[reply]
    If it's not new to you, I would have hoped to see it in your trial edits. While the duplicate may have been a result of an error, they are out there and if you are removing redundant categories, you need to be removing them all. They aren't common enough to run a further trial, but once you have written the regex, please test it on File:STENUM Logo 2010.jpg and paste your regex here. Good task btw. :) ~riley (talk) 19:24, 6 May 2016 (UTC)[reply]
    @~riley: Here's the edit, and follows the regex (void replace):
    (?<=\[\[ *Category[ _]*:[ _]*([^\[\]\n]*)[ _\t\u200B\u200E\uFEFF]*\]\][\w\W]*)\[\[ *Category[ _]*:[ _]*\1[ _\t\u200B\u200E\uFEFF]*\]\]
    It's generic (thanks to the backreference \1), so it should work for any duplicate category. I handled the zero-width space and other invisible unicode symbols because in the linked edit I had to deal with them. --Horcrux92 (talk) 20:59, 6 May 2016 (UTC)[reply]
    Looks great! ~riley (talk) 02:50, 7 May 2016 (UTC)[reply]

If there are no objections, this looks good to be approved. ~riley (talk) 15:30, 8 May 2016 (UTC)[reply]

Approved, botflag granted. --Krd 14:07, 9 May 2016 (UTC)[reply]