Commons:Bots/Work requests

From Wikimedia Commons, the free media repository
(Redirected from Commons:BR)
Jump to navigation Jump to search

Shortcuts: COM:BR • COM:BWR

SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 7 days.


# Bot request Status 💬 👥 🙋 Last editor 🕒 (UTC) 🤖 Last botop editor 🕒 (UTC)
1 POTD - Interwiki transclusion 8 3 Tacsipacsi 2023-11-14 22:39 Schlurcher 2023-11-05 16:57
2 Delete unnecessary licensing information from files 7 2 Adamant1 2023-10-31 12:44 Schlurcher 2023-10-31 09:29
3 Remove Template:WikiProject Aviation from file talk pages 1 1 El Grafo 2023-11-24 16:06
Legend
  • In the last hour
  • In the last day
  • In the last week
  • In the last month
  • More than one month
Manual settings
When exceptions occur,
please check the setting first.


POTD - Interwiki transclusion[edit]

Hello! Is there any bot operator willing to help in achieving this idea here? - Klein Muçi (talk) 00:06, 23 October 2023 (UTC)Reply[reply]

Sounds reasonably easy. Could you show the steps manually that you expect to do the bot on a daily basis? --Schlurcher (talk) 11:25, 30 October 2023 (UTC)Reply[reply]
Schlurcher, thank you for your interest!
Just so I don't accidentally lead you astray, I believe @Tacsipacsi can explain better the exact steps needed to be done.
I'm assuming the bot daily checks the photo of the day and converts the template for it into tabular data which then can be interwiki transcluded? — Klein Muçi (talk) 23:03, 31 October 2023 (UTC)Reply[reply]
I have no exact steps, it’s up to the bot owner how exactly to do it. It needs to contain two things for each day:
  • the file name from Template:Potd/YYYY-MM-DD (e.g. Template:Potd/2023-11-01: Muelle Monroe, Chicago, Illinois, Estados Unidos, 2012-10-20, DD 10.jpg; can be got by expanding the wikitext {{Potd/YYYY-MM-DD}} in the context of API),
  • all captions from Template:Potd/YYYY-MM-DD (xx) (e.g. Template:Potd/2023-11-01 (en): View of quiet Monroe Harbor in fall at dawn, [[:en:Chicago|Chicago]], Illinois, USA., Template:Potd/2023-11-01 (fr): Soleil couchant sur le ''Monroe Harbor'', un port de [[:fr:Chicago|Chicago]] (États-Unis).; can be got by expanding the wikitext {{Potd/YYYY-MM-DD (xx)}} in the context of API).
It should be stored on .tab pages in the Data namespace, with periodically (e.g. monthly or yearly) new pages to prevent the page to be loaded getting too large, and have licensed CC BY-SA 4.0 because of the captions originating from CC BY-SA 4.0 template pages. That’s the requirements.
An implementation idea is to use the following schema:
{
    "license": "CC-BY-SA-4.0",
    "description": {
        "en": "Picture of the day data for November 2023"
    },
    "sources": "[[Template:Potd/2023-11]]",
    "schema": {
        "fields": [
            { "name": "date", "type": "string", "title": { "en": "Date" }},
            { "name": "filename", "type": "string", "title": { "en": "File name" }},
            { "name": "caption", "type": "localized", "title": { "en": "Caption" }}
        ]
    },
    "data": [
        [
            "2023-11-01",
            "Muelle Monroe, Chicago, Illinois, Estados Unidos, 2012-10-20, DD 10.jpg",
            {
                "en": "View of quiet Monroe Harbor in fall at dawn, [[:en:Chicago|Chicago]], Illinois, USA.",
                "fr": "Soleil couchant sur le ''Monroe Harbor'', un port de [[:fr:Chicago|Chicago]] (États-Unis).",
                
            }
        ],
        
    ]
}
Tacsipacsi (talk) 11:32, 1 November 2023 (UTC)Reply[reply]
Ok, that's more involved than I thought. Maybe someone else has the time to get this working. --Schlurcher (talk) 16:57, 5 November 2023 (UTC)Reply[reply]
I’ve created a Pywikibot script at https://gitlab.wikimedia.org/tacsipacsi/pywiki/-/blob/main/potd_tabular.py. Unfortunately it turned out that localized columns cannot be longer than 400 characters per language, and some captions are longer than that (some language(s) on November 15, November 27 and November 29 in this month – the error message doesn’t include any details other than the row and column numbers, which translate to days and the fact that captions are affected), which make the saving fail. I don’t know why the limit is 400, maybe it could be increased if not entirely removed. —Tacsipacsi (talk) 21:34, 7 November 2023 (UTC)Reply[reply]
Tacsipacsi, maybe a temporary ugly workaround would be to just have the minimal necessary tabular data that make interwiki transclusion possible while meanwhile asking for that limit to be changed? Or is that part unavoidable? — Klein Muçi (talk) 03:16, 8 November 2023 (UTC)Reply[reply]
@Klein Muçi: It depends on what you consider “making interwiki transclusion possible”. I could just not include any captions, which would technically make it work, but I don’t consider a picture of the day without caption useful. While I could also make the script only drop (or truncate) captions longer than 400 characters, I don’t want to do that because it would result in unpleasant surprises: since most captions in most languages would work, people would assume that everything’s okay, and then one day readers would be presented an English caption despite having a translated one, or a truncated caption. —Tacsipacsi (talk) 22:39, 14 November 2023 (UTC)Reply[reply]

Delete unnecessary licensing information from files[edit]

Hi. Would it possible to have a bot remove some pointless licensing information from a bunch of files related to Allentown, PA? I think there's like 65,000 files that all have the same information. It's not really necessary though and just screws with searches for anything semi-related to things that are mentioned in the details. One example is the licensing information in File:1929 - Allentown - Bethlehem Gas Company - 31 Mar MC - Allentown PA.jpg and Category:Newspaper advertising in Allentown, Pennsylvania, which the file is in, would probably be a good place to start. Thanks. Adamant1 (talk) 01:39, 30 October 2023 (UTC)Reply[reply]

Hi, could you please show a manual diff of the expected change that should be repeated over the category proposed? --Schlurcher (talk) 11:26, 30 October 2023 (UTC)Reply[reply]
@Schlurcher: Yeah sure. Here's one. I want essentially everything in the yellow block of text to be removed. --Adamant1 (talk) 11:32, 30 October 2023 (UTC)Reply[reply]
@Adamant1: There not that many in the category you mentioned. So you would need a larger net. Maybe you want to give it a try, I've used Commons:AWB for this. --Schlurcher (talk) 16:20, 30 October 2023 (UTC)Reply[reply]
@Schlurcher: I'll look into that. If you check out this search it gives 67,248 results, most of which are caused by the paragraph that I'm trying to get rid. I don't really have the time or knowledge to deal with that many instances even if I'm allowed access to the tool. So I'd still prefer it they were just fixed with a bot as opposed to me doing it myself and potentially screwing something up because I'll be in a hurry and not know what I'm doing. --Adamant1 (talk) 18:03, 30 October 2023 (UTC)Reply[reply]
@Adamant1: I've now removed these statements from 4'500 files with my bot. --Schlurcher (talk) 09:29, 31 October 2023 (UTC)Reply[reply]
Thanks. That's at least an improvement. I'll see what I can do on my end when I have the time. --Adamant1 (talk) 12:44, 31 October 2023 (UTC)Reply[reply]

Remove Template:WikiProject Aviation from file talk pages[edit]

See also: Commons:Deletion requests/Template:WikiProject Aviation. The template was a somewhat foolish attempt at adding an en-wiki style WikiProject banner template to the talk page of each and every aviation-related file. Luckily, that never took off, but there are still about 200 file talk pages that have that banner. If someone could remove them so we can move on with deleting the template, that would be great. Thanks, El Grafo (talk) 16:06, 24 November 2023 (UTC)Reply[reply]

Move files to another category[edit]

Hello. I need to move files from Category:Photographs by Petro Hruhko to Category:Photographs by Petro Hrushko. Thanks! Maks (talk) 07:51, 25 November 2023 (UTC)Reply[reply]

Help:Gadget-Cat-a-lot --Krd 08:17, 25 November 2023 (UTC)Reply[reply]