Commons:Bots/Work requests

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

Shortcut: COM:BR · COM:BWR

Bot policy and list · Requests to operate a bot · Requests for work to be done by a bot · Changes to allow localization  · Requests for batch uploads
Gnome-system-run.svg


Filing cabinet icon.svg
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 1 day.

Replace hardcoding with template[edit]

Category:Buildings in Ohio has a large number of localised subcategories with hardcoded category declarations that could be replaced with a set of templates I've recently created. There are eighty-eight counties, each of which can have up to twelve of these subcategories, as follows:

Buildings in X
 Churches in X
 Houses in X
 Wooden buildings in X
 Brick buildings in X
 Stone buildings in X
  Wooden houses in X
  Brick houses in X
  Stone houses in X
  Wooden churches in X
  Brick churches in X
  Stone churches in X

Many counties don't have all of these categories, since one was created only if the contents existed; we have no stone-house images from Noble County, for example, so Category:Stone houses in Noble County, Ohio is a redlink. The templates are as follows:

Could a bot check each category meeting this pattern and replace its current contents with the template? I'm imagining it going to Category:Buildings in Ohio by county, opening Category:Buildings in Adams County, Ohio, opening each of its subcategories that meet the above pattern, replacing each one's code as noted above, and then going through the Allen County buildings, the Ashland County buildings, and all the way alphabetically through the Wyandot County buildings. The default contents of each category are the same as what's transcluded by the template, but there's always a small chance that a category might deviate; if you could have the bot log the exceptions for manual review, that would be quite helpful.

Thanks! Nyttend (talk) 13:39, 14 April 2016 (UTC)

Hmm, this will move direct categories to categories via templates? The latter makes it more difficult/impossible to use for example cat-a-lot. What are the benefits of having templates instead of categories? Basvb (talk) 14:06, 14 April 2016 (UTC)
I think my meaning was unclear. I'm not asking that you edit any files whatsoever, but that you edit the category itself, e.g. this edit I just made to Category:Wooden houses in Huron County, Ohio. There are few situations in which one category needs to be different from the rest, and those categories can always go without the template. Unless the whole system is reworked (in which case, all relevant categories will need to be edited, so a template will speed things considerably), Wooden houses in Huron County will always need to be a subcategory of Wooden buildings in Huron County, Houses in Huron County, and Wooden houses in Ohio (no reason to remove any of them), and situations where we need an additional category will be rare. Nyttend (talk) 14:27, 14 April 2016 (UTC)
My excuses, then my comment is irrelevant as I indeed misunderstood. For categories this is indeed a preferable system. Basvb (talk) 14:56, 14 April 2016 (UTC)
Oh lordy; Sounds like fun. This should be a nice and easy AWB task. I'll run this task in about two hours once I'm free if nobody else does. :) Riley Huntley (talk) 16:24, 14 April 2016 (UTC)

Edits: 953 Skipped: 5 Task mode: Supervised semi-automatic. Sanity checks: First and last subcategory.

Buildings in X        | Done
Churches in X         | Done
Houses in X           | Done
Wooden buildings in X | Done
Brick buildings in X  | Done
Stone buildings in X  | Done
Wooden houses in X    | Done
Brick houses in X     | Done
Stone houses in X     | Done
Wooden churches in X  | Done
Brick churches in X   | Done
Stone churches in X   | Done

This was more labor intensive than I thought as not all of the categories shared the same format, having it now standardized is much nicer. If you're satisfied with this result, please mark as complete using {{Section resolved|1=~~~~}}. Thanks Nyttend! Riley Huntley (talk) 18:44, 14 April 2016 (UTC)

P.S. This task was run using categories like Category:Brick buildings in Ohio by county, Category:Stone churches in Ohio and so forth. If the subcategories were not categorized, I would have missed them. Judging by the results, I doubt this is the case. Riley Huntley (talk) 18:49, 14 April 2016 (UTC)
Hmm. It looks like we lost the ability to use sortkeys when the templates were applied. Is there a way to regain that functionality? - Eureka Lott 20:55, 16 April 2016 (UTC)
{{DEFAULTSORT}} is an option, either that or the template needs to be modified. Riley Huntley (talk) 00:06, 17 April 2016 (UTC)
Thanks. Using DEFAULTSORT probably isn't a good solution here, so that leaves enhancing the templates. Got any pointers? - Eureka Lott 03:35, 18 April 2016 (UTC)
Eureka Lott, I don't see why you'd want to do that. The coding for each template is supposed to change the sort in some instances; for example, {{USCountyHouseMat|Brick|Cuyahoga|Ohio}}, applied to "Brick houses in Cuyahoga County, Ohio", sorts "Brick buildings in Cuyahoga County, Ohio" as "Houses" and "Brick houses in Ohio" as "Cuyahoga". If it's not doing that, or if you disagree with the current setup, please let me know. If it's doing as designed, and you agree that it should normally do this but have found an exception, you can always revert the bot and transclude the categories manually. Nyttend (talk) 04:15, 18 April 2016 (UTC)
For most counties, the new templates work very well. However, the categories for the larger urban counties, like Hamilton County, get more complicated. There can be up to four types of categories within them: by city categories, by material categories, by type categories, and individual building categories. Using sortkeys to separate the different category types can help make the categories more understandable to visitors. - Eureka Lott 17:15, 18 April 2016 (UTC)

Music copyright detection bot[edit]

Wikipedia Zero's made us attractive as a piracy host (T129845). To combat music piracy I suggest setting up an audio fingerprinting system like Echoprint or AcoustID. These are open sourced (unlike Shazam or Gracenote) and supposedly easy to get running. Tracking this as T132650. Dispenser (talk) 23:19, 14 April 2016 (UTC)

Easy: scrape Unsplash photo metadata[edit]

Unsplash photos usually have metadata in /info pages, eg. https://unsplash.com/photos/3DuDyX5Fpuk/info. However, the images themselves have no metadata embedded in them. It would be useful to get a bot to fetch the metadata in /info pages and categorize Images from Unsplash accordingly. ~pikolas [[mia diskuto]] 19:41, 15 April 2016 (UTC)

@Pikolas: Example diffs please. :) Riley Huntley (talk) 00:22, 24 April 2016 (UTC)
@Riley Huntley: Hey Riley, thanks for replying. I'm not sure what you meant to say though. I was thinking of having the bot adding categories such as "Photos taken with camera XXXX". Maybe it would be possible to alter the actual metadata of the image, but I'm not sure if this is currently possible. ~pikolas [[mia diskuto]] 04:11, 24 April 2016 (UTC)
@Pikolas: Altering the actual EXIF data requires reuploading the images, this is not an "easy" task by any means and unsplash.com painfully displays it's information. Seems like a lot of work for less than 500 images, but I'll leave the judging to a bot operator whos wanting to do this task. Riley Huntley (talk) 00:58, 26 April 2016 (UTC)

Automatic upload of USGS Earthquake shakemaps[edit]

See also: Category:ShakeMaps

Not unimportant: there should be a bot polling USGS-Earthquake , then in case of Earthquake with Magnitude > 7 it should instantly upload the shakemap (site,file) . --Itu (talk) 20:24, 29 April 2016 (UTC)

Isn't this something better suited for Wikidata? Or is it more than a single point with a radius gradient? Dispenser (talk) 21:20, 29 April 2016 (UTC)
It's definitely more complicated than a simple gradient. -- King of ♠ 23:12, 29 April 2016 (UTC)
?? - It's not about having raw data or deriving data from images. It's about instant automatic transfer of images generated by USGS earthquake authority to commons whenever a relevant earthquake occurs. --Itu (talk) 01:39, 30 April 2016 (UTC)

Commons:Template i18n/bot replacements[edit]

If anyone wants to help, I'll be running my bot through Commons:Template i18n/bot replacements later today. Some of these are being cleaned up on-going, many of them aren't. I've just noticed the following as well that I'll add to the list when I get a chance:

|other_versions=Nope(.|)

I appreciate any help. :) Riley Huntley (talk) 17:47, 2 May 2016 (UTC)