Jump to content

Wikipedia:Bots/Requests for approval/UrbanBot 2

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Casualdejekyll (talk | contribs) at 02:38, 17 September 2023 (→‎Discussion: reply to Primefac). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Operator: Urban Versis 32 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 18:17, Saturday, July 15, 2023 (UTC)

Automatic, Supervised, or Manual: supervised

Programming language(s): Python (Pywikibot)

Source code available: Main repository for UrbanBot's code Source code file for task

Function overview: UrbanBot's task is to mass-add short descriptions to pages that don't have one.

Links to relevant discussions (where appropriate): Original discussion at village pump Wikidata discussion for bot task

Edit period(s): Runs whenever the bot operator runs the script

Estimated number of pages affected: Any page lacking a short description may be edited by UrbanBot. This is not to say it will try to add short descriptions to every page lacking one.

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): No

Function details: 1. The bot operator will first enter a category name from the English Wikipedia. This category will be used to group pages lacking a short description which will all have the same short description added to them.

2. The bot operator will enter the short description to be added to the pages in the Wikipedia category.

3. The code will check the short description entered to ensure that it does not exceed the character limit.

4. The bot will follow through these steps for each page:

4a. The bot will check if the page already has a short description or a template-applied short description.

4b. If the Wikipedia page does not already have a short description, the bot will write the short description specified by the bot operator in step 2 into the item.

4c. The bot will loop through to the next page in the category and run all steps in step 4 again until every page has been scanned.

5. The bot will output statistics on the number of pages scanned, number edited, etc.

Note: The bot was originally submitted at Wikidata and was designed to edit Wikidata per this village pump discussion, but upon reviewing the Wikiproject Short Descriptions page and receiving feedback and information at Wikidata it's evident that for the intended task the bot should be based at Wikipedia and edit Wikipedia short descriptions rather than Wikidata descriptions.

Note 2: Running the bot through limited testing for the code.

Discussion

Can you give some examples where it's helpful for all pages in the category to have the same short description? In such cases, it would probably be more useful to apply the shortdesc via a template instead. – SD0001 (talk) 06:55, 16 July 2023 (UTC)[reply]
One such category would be Category:Linux distributions. I ran UrbanBot through this category to test the code when UrbanBot was still editing Wikidata. UrbanBot applied the following Wikidata description to articles in the category that did not have a short description or Wikidata description: "Linux distribution". This sort of thing works well when all pages in a category share the same main property, such as all being a Linux distribution. However, other categories wouldn't be as good for this, such as Category:Alumni of Lancaster University, when the only thing the pages in this category have in common was that they were all alumni of Lancaster University. This isn't what these people are known for though, evident by a variety of existing Short descriptions in this category such as "Danish sociologist" and "Irish politician". Urban Versis 32KB(talk / contribs) 16:40, 16 July 2023 (UTC)[reply]
How will the bot or bot operator ensure that the category assignment is correct? Honor (brand) is in Category:Linux distributions, but it does not appear to be a Linux distribution. Also TurnKey Linux Virtual Appliance Library, which is in that category but does not appear to fit the proposed SD. – Jonesey95 (talk) 03:22, 17 July 2023 (UTC)[reply]
That's why the bot is classified as supervised; I will look at the edit history of the bot and make sure each article is a Linux distro, in this case. Also, if a page that's not a Linux distribution is in the category for Linux distributions, then there's not reason for it to be in that category IMO. Urban Versis 32KB(talk / contribs) 15:02, 17 July 2023 (UTC)[reply]

In step 1 or step 4a, how does the bot determine if there is a short description that has been assigned by a template? Will the bot apply manual short descriptions to override template-based SDs? If so, why, or under what conditions? – Jonesey95 (talk) 03:25, 17 July 2023 (UTC)[reply]

Good point. I have fixed this to where the bot will also check if there is a template-applied short description on the page, and if so, to not override the SD as it would have before. Urban Versis 32KB(talk / contribs) 15:22, 17 July 2023 (UTC)[reply]

According to Wikipedia:WikiProject Short descriptions § State of the project there are over 1 million pages that are lacking shortdescs. Are you seriously saying (based on the "supervised" nature of this task) that you and your bot are going to add 1 million shortdescs? Primefac (talk) 16:09, 6 August 2023 (UTC)[reply]

No. If you're referring to the fact that I put "any page lacking a short description" to the estimated number of pages affected, I was trying to explain that any page lacking an SD could potentially be modified by UrbanBot. I wasn't saying that UrbanBot would try to add an SD to every single page lacking one. Urban Versis 32KB(talk / contribs) 20:57, 6 August 2023 (UTC)[reply]
A slightly more well-defined scope would be appreciated. Feel free to amend the main proposal directly. Primefac (talk) 07:42, 8 August 2023 (UTC)[reply]
It seems to me that the intended scope is "pages lacking short descriptions in manually selected categories". Difficult to put a number on that. casualdejekyll 02:38, 17 September 2023 (UTC)[reply]